Note: if a Redux integration exists, you might not want to couple your router state to Redux. Anyway that's my advice avec a few years: bind yourself to the router directly.
reduxPlugin
)router5Middleware
)router5Reducer
).reduxPlugin
to your router. The plugin simply syncs the router state with redux. To navigate, you will need to invoke router.navigate
. If you use React, you can use BaseLink
from react-router5
.navigateTo(routeName, routeParams = {}, routeOptions = {})
cancelTransition()
clearErrors()
canActivate(routeName, true | false)
canDeactivate(routeName, true | false)
router5Middleware
alongside your other middlewares:router5Reducer
) that you can add to your application. It contains four properties:route
previousRoute
transitionRoute
(the current transitioning route)transitionError
(the last error which occured)routeNodeSelector
has been renamed to createRouteNodeSelector
. In order to use it efficiently, you need react-redux >= 4.4.0 to be able to perform per component instance memoization.createRouteNodeSelector
is a selector creator designed to be used on a route node and works with connect
higher-order component from react-redux
.createRouteNodeSelector
will only output a new state value if the provided node is concerned by a route change.createRouteNodeSelector
with other connect properties: