https://github.com/morlay/redux-bootstrap
https://github.com/morlay/redux-bootstrap
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/morlay/redux-bootstrap
- Owner: morlay
- Created: 2016-08-03T04:23:25.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-03T10:40:33.000Z (almost 10 years ago)
- Last Synced: 2025-02-09T00:48:25.010Z (over 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Redux Bootstrap
Bootstrap for my web redux react projects
[](https://travis-ci.org/morlay/redux-bootstrap)
[](https://npmjs.org/package/@morlay/redux-bootstrap)
[](https://david-dm.org/morlay/redux-bootstrap)
### Grouped Packages
* react
* react-dom
* redux
* react-router
* react-router-redux
* react-redux
* recompose
* lodash
### Extra APIs
### `bootstrap: Promise`
```js
bootstrap({
history,
location: ReactRouterLocation,
getRoutes: (store) => ReactRouterPlainRoute,
reducers: Object, // optional
middlewares: Array, // optional
composes: Array, // optional
initialState,
})
.then(({ redirectLocation, ...renderProps }) => {
// do render in browser or server-side
})
```
same as [react-router#mactch](https://github.com/reactjs/react-router/blob/master/docs/API.md#match-routes-location-history-options--cb)
but return Promise resolve `{ [renderProps], [redirectLocation] }` and reject `err`
* `store` and `history` must be passed for `react-router-redux#syncHistoryWithStore`
### ``
### `connectStateProps(mapStateToProps)` and `connectDispatchProps(mapDispatchToProps)`
same as `react-redux#connect` but simplify args.
* `mergeProps` could use `recompose#mapProps` instead.
### `withRouting(Component)`
provide `{ routing }` in props,