Trigger navigation to another route with Admin-on-rest/ReactJS

442 Views Asked by At

What's the correct way to trigger navigation to another route on button click for example? My current solution is to set window.location to the route I want.

1

There are 1 best solutions below

0
On

Use the withRouter HOC from react router with a custom button: https://reacttraining.com/react-router/web/api/withRouter