I would like to add an event listener to a navigate
event in react router v6. I have not found anything to it. Is there such a feature?
Edit: When the event is handled, I want to prevent the navigation and route the user to another destination, which depends on where he is comming from.
history.block
. Perhaps at some point thePrompt
component will be added back into v6 (reactrouter.com/docs/en/v6/upgrading/…). – Neiman