Created
October 31, 2018 19:28
-
-
Save productioncoder/6b12cb409b84130eaa88f0d1e967455f to your computer and use it in GitHub Desktop.
Youtube: prevent update block by using the withRouter helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* just add this import */ | |
import {Route, Switch, withRouter} from 'react-router-dom'; | |
/* and update the default export */ | |
export default withRouter(connect(null, mapDispatchToProps)(App)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment