Is it possible to listen for route changes AND onwindowunload both to confirm page leave without saving changes?
Use cases:
- User clicks Back
- User presses back button in browser
- User types in a different URL
If the user clicks 'cancel' stop the page / route change.
I've seen a few different examples but none worked quite right.