Redux Leaves
Write once. Reduce anywhere.
Example
// set up with initial stateconst initialState = counter: 0 list: props: {} const reducer actions = const store = // setup complete! Now dispatch actions to your heart's content console// => { counter: 0, list: [], props: {} } storeconsole// => { counter: 10, list: [], props: {} } storeconsole// => { counter: 10, list: ['foo'], props: {} } const compoundAction = storeconsole/* => { counter: 0, list: ['foobar'], props: { at: { arbitrary: { path: 'here I am!' } } } }*/
Documentation
npm install --save redux-leaves
Getting started
API reference
Testing
To run all tests locally:
git clone git@github.com:richardcrng/redux-leaves.gitcd redux-leaves && npm run test a
Most tests are located alongside their relevant API documentation in the docs folder.