OneCompiler

How to change route on button click in react router?

I have a button, when the user presses it I want to move the user to another route. how can I do so?

1 Answer

5 years ago by

You can try something like this

<Redirect to='/route' />
5 years ago by Divya