componentWillReceiveProps(nextProps) {
const currLocationKey = this.props.location.key;
const nextLocationKey = nextProps.location.key;
if (currLocationKey !== nextLocationKey) {
// do the magic here
}
}
Created
November 16, 2017 17:36
-
-
Save Landish/1ee61b38fb2ee6f1fc8e5499d4ebfeeb to your computer and use it in GitHub Desktop.
Reload Current Page With React Router 4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment