@banbrick/redux-creator
v1.5.1
Published
redux creator for less boilerplate
Downloads
70
Readme
@banbrick/redux-creator
redux creator for less boilerplate, also allow redux to be loaded by code split.
Install
npm i @banbrick/redux-creator
Example
How to use
Configure store
create a store can use ReduxCreator with configureStore
import { configureCreatorStore } from '@banbrick/redux-creator';
// its also possible to add reducers and middlewares through this api
const store = configureCreatorStore({
reducers, // static reducers, built without creator
preloadedState, // inital state
middlewares, // addtional middlewares
history, // for auto add location middleware
devTool: true // enable redux-dev-tool
});
Configure Reducers
- ReduxCreator using functions
- ReduxService using decorators