Helper to create redux namespaced action creators & reducers with minimal boilerplate. Easily execute actions and run built-in reducer tests from the console during development, even before creating a UI.
Go from this:
const DECREMENT = 'DECREMENT';const INCREMENT = 'INCREMENT'; { return type: DECREMENT ;} { return type: INCREMENT ;} { };
To this:
; const schema = state - actionpayload state + actionpayload; const counter = ;
Changes
v2.0.0
- Removed Promise object notation. Unnecessary and easily achieved using Redux-Thunk + async functions.
- Added shorthand to specify actionCreator object properties with an array.
- Now uses immerjs behind the scenes, reducers can return a new state as before (classic), or mutate a draft state which gets converted to a new state by immerjs.