August 2017
Beginner
374 pages
10h 41m
English
No. React-router and Redux work fine together, even without a deep integration.
However, there is sometimes an issue that a component doesn't update when the location changes. This issue happens if:
The problem here is that Redux implements the shouldComponentUpdate React lifecycle hook, and Redux does not know that anything changed if it isn't receiving props from the router.
This issue can be fixed by wrapping the component with the withRouter helper after wrapping it with connect, like this:
import { withRouter } from 'react-router-dom' ...Read now
Unlock full access