@morlay/redux-bootstrap
v0.0.1
Published
Bootstrap for my web redux react projects
Downloads
1
Readme
Redux Bootstrap
Bootstrap for my web redux react projects
Grouped Packages
- react
- react-dom
- redux
- react-router
- react-router-redux
- react-redux
- recompose
- lodash
Extra APIs
bootstrap: Promise
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
but return Promise resolve { [renderProps], [redirectLocation] }
and reject err
store
andhistory
must be passed forreact-router-redux#syncHistoryWithStore
<RouterProvider {...renderProps} client/>
connectStateProps(mapStateToProps)
and connectDispatchProps(mapDispatchToProps)
same as react-redux#connect
but simplify args.
mergeProps
could userecompose#mapProps
instead.
withRouting(Component)
provide { routing }
in props,