Wondering what’s next for npm?Check out our public roadmap! »

    @morlay/redux-bootstrap

    0.0.1 • Public • Published

    Redux Bootstrap

    Bootstrap for my web redux react projects

    Build Status NPM Dependencies

    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 and history must be passed for react-router-redux#syncHistoryWithStore

    <RouterProvider {...renderProps} client/>

    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,

    Keywords

    none

    Install

    npm i @morlay/redux-bootstrap

    DownloadsWeekly Downloads

    0

    Version

    0.0.1

    License

    WTFPL

    Last publish

    Collaborators

    • avatar