Can I Block All Back Navigation?
With
A
or useNavigation()
, I can set replace: true
to remove the most recently visited page from the browser history.
But this doesn't block back navigation. If I click back, I skip the most recent page and go to the page that was visited before the page I just came from.
Is there any way that I can block all back navigation on a specific page?2 Replies
useBeforeLeave with preventDefault
https://docs.solidjs.com/solid-router/reference/primitives/use-before-leave#usebeforeleave
Thank you @Madaxen86 !