black-lion
v1.1.1
Published
State handler for Arus projects
Downloads
12
Readme
black-lion
The core of your Arus
project, BlackLion
is the link between the front and backend of your project. It uses Redux
to store data and trigger changes within your app.
Redux uses a combination of Reducers
and Actions
to handle changes to state within an app.
Reducers
Reducers handle the actual modification of the state given a specified action.
Actions
Actions tell the Reducer what is going on so that it can modify the state appropriately.
Further Reading
If you wish to learn more about Redux please help yourself to this great documentation
Adding Services
create actions in
./lib/actions/<ServiceName>Actions.js
create a reducer in
./lib/reducers/<ServiceName>Reducer.js
add
<serviceName>State
field to thereducer
object in./index.js
with a value of the imported<ServiceName>Reducer.js
fileadd
<ServiceName>Actions
field to theactions
object in./index.js
with a value of the imported<ServiceName>Actions.js
fileadd mock response data to the
./test/lib/mocks.js
file and export themadd a mock service call to the
./test/lib/Connector.js
file that returns the mock data you just createdcreate tests
make sure all tests are still passing by running
npm test
increment the third digit of the version
add your name and email to the
contributors
field inpackage.json
submit a pull-request to the
dev
branch