create-redux-store
Util for create redux store
installation:
npm install create-redux-store
import:
es5:
var createReduxStore = ;
es6:
;
examples:
creating
const store = ;
reduser - Function or Object
middleware - Function or the array of functions
how it works
store;// set { type : 'test:action'} store;// promise.then(result => store.dispatch(result)// promise.catch(error => store.dispatch({ type: '@@ERROR', error: error}) store;//set { type : '@@ERROR', error : Error } store;
When the array is passed, subscribers will be called once after the last action is processed.
Processing of actions for q and m remains the same.
If NODE_ENV=development, redux-devtools-extension is automatically connected
more tests
https://github.com/kkarifan/create-redux-store/tree/master/tests
OR:
npm run test:redusers
npm run test:string
npm run test:error
npm run test:promise
npm run test:array
npm run test:mixedarray
npm run test:perf
npm run test:mdw
npm run test:objectmdw