Created
August 4, 2019 12:05
-
-
Save h26k2/331b3e72c61a4421184e29e2882677a3 to your computer and use it in GitHub Desktop.
programmatically redirects REACT
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
// for redirect to a page | |
this.props.history.push({ | |
pathname : '/signin' | |
}) | |
//for redirect to a page with query parameters | |
this.prosp.history.push({ | |
pathname: '/events', | |
search: '?category=all' | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment