@sashadevkit/react-leave-guard
v0.1.0
Published
Headless navigation guard for React Router with custom modal and native beforeunload support.
Maintainers
Readme
@sashadevkit/react-leave-guard
A tiny headless navigation guard for React Router.
Supports:
- custom confirmation dialogs (SPA navigation)
- native browser protection (reload / close tab)
Why?
React Router blocks only SPA navigation.
This library also handles:
- page reload
- tab close
- external navigation
Install
npm install @sashadevkit/react-leave-guard