Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created October 31, 2018 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save productioncoder/6b12cb409b84130eaa88f0d1e967455f to your computer and use it in GitHub Desktop.
Save productioncoder/6b12cb409b84130eaa88f0d1e967455f to your computer and use it in GitHub Desktop.
Youtube: prevent update block by using the withRouter helper
/* 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