So, Im trying to go to the route /forecast that i have defined among my routes. When trying to reach it with a link like this:
<Link to="/forecast">Test</Link>
Its working. But now Im trying to reach it programatically, after a button press, and Im having trouble understanding what to do in v4 of react-router. Ive tried this:
history.push('/forecast');
Which is what i gathered from the official documentation. But its not working, what am i supposed to do when trying to reach a route inside a function?