redux-dynamics
Strongly-typed collection of useful tools to make your Redux workflow more dynamic.
Features
Reducers
- No huge
switch
statements! state
is always immutableaction
is always immutablecontext
shared between all subscriptions- Declarative reducer subscriptions to the actions
- Encouraging pure resolver functions
- Support of
RegExp
as the expected action type
Getting started
Install
NPM:
npm install redux-dynamics --save
Yarn:
yarn add redux-dynamics
Create a reducer
// ./store/comments/index.js; /* Create a new reducer with initial state */const reducer = likes: 0; /* Subscribe to different actions */reducer; reducer; ;
Connect to Redux
// ./store/reducer.js;; /* Convert "Reducer" class into pure reducer function */ comments: commentsReducer;
Documentation
For more details on methods, usage examples and troubleshooting see the Documentation.
Contributing
Feel free to submit your ideas on enhanced Redux workflow by issuing a Pull request.
In case you have discovered a bug, outdated documentation or any other mismatch, please create a new Issue.
License
This library is licensed under MIT license.