1.2.1 • Published 3 years ago
@indlekofer/redux-store v1.2.1
@indlekofer/redux-store
redux store with injectable reducers and middleware for module seperation
Usage
import store from '@indlekofer/redux-store';
//dispatch actions
store.dispatch({type: "test"});
//dispatch thunk - thunk middleware is always there
store.dispatch(() => (dispatch, getState) => dispatch({type: "test"}));
Function exports
injectReducer
reducer: function
namespace: string
force: boolean (optional default false) replace existing namspaces
removeReducer
remove a specific reducer by namespace
namespace: string
resetReducers
remove all reducers
injectMiddleware
middleware: function
namespace: string
force: boolean (optional default false) replace existing namspaces
removeMiddleware
namespace: string