Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JiarongGu/banbrick-redux-creator
https://github.com/JiarongGu/banbrick-redux-creator
react redux
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/JiarongGu/banbrick-redux-creator
- Owner: JiarongGu
- Created: 2019-03-02T10:08:59.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-14T12:25:21.000Z (almost 6 years ago)
- Last Synced: 2023-09-20T00:17:13.038Z (over 1 year ago)
- Topics: react, redux
- Language: TypeScript
- Size: 155 KB
- Stars: 12
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [@banbrick/redux-creator](https://www.npmjs.com/package/@banbrick/redux-creator)
redux creator for less boilerplate, also allow redux to be loaded by code split.## Install
```npm i @banbrick/redux-creator```## Example
[ReactCoreTemplate](https://github.com/JiarongGu/ReactCoreTemplate/tree/master/ReactCoreTemplate/ClientApp)## How to use
### Configure store
create a store can use ReduxCreator with configureStore
```javascript
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](https://github.com/JiarongGu/banbrick-redux-creator/blob/master/doc/ReduxCreator.md) using functions
- [ReduxService](https://github.com/JiarongGu/banbrick-redux-creator/blob/master/doc/ReduxService.md) using decorators- ReduxService moved to [Redux-Sink](https://github.com/JiarongGu/redux-sink)
### Others
- [Advanced](https://github.com/JiarongGu/banbrick-redux-creator/blob/master/doc/Advanced.md)