I want to change URL when clicking on component Links, same way they currently change by default, but without them being pushed to browser history. I've found the following working for someone in this answer:
this.props.activeRouteHandler({key: "anystring"})
but I don't know where should I place it and if it even works anymore. Can someone give me an example? Thanks
Use the replace property of Link and set it to true.
Here is a link to the documentation: https://reactrouter.com/web/api/Link
ex.
<Link to=[your_url] replace={true}>
...
</Link>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With