redux-rac-utils
This is a set of utils for creating redux actions creators and reducers.
Getting started
npm install --save redux-rac-utils
Creating a reducer
This helper creates a redux reducer. It relies on the fact that an action object must be FSA compliant.
; const initialState = value: 0; const reducer = ; ; /*{ value: 0}*/
Creating an actions creator
; const actionsCreator = ; ; /*{ type: 'INC'}*/ ; /*{ type: 'INC', payload: 5}*/
You could also provide payloadCreator
and metaCreator
(similar to redux-actions).
; const actionsCreator = ; ; /*{ type: 'INC'}*/ ; /*{ type: 'INC', payload: 10, meta: 15}*/