react-router-redux-bind
Redux bindings for React Router Next v4
Installation
npm install --save react-router-redux-bind
Tutorial
A simple example of connecting to redux
const history = const reducers = const middleware = const store =
Actions
storestorestore
Routes
You can store a react-router match props through passing to ConnectedRouter
a simple route config looks like:
path: '/' exact: true component: path: '/topics' component: path: '/topics/:id' component:
And after action LOCATION_CHANGE
store
Server side
Just use <StaticRouter />
and dispatch setLocation
action creator, pass request url and route config.
const routes = const request: url = ctx // koa.js store
redux-saga
Use it with { while true try const payload: match: path = if path === '/some' const collection = catch err }