Registers a navigation blocker. The callback must return a Promise
<boolean>
:
true = allow, false = block.
The caller is responsible for providing a stable callback reference
(e.g. via useCallback) — registrations only change when the reference changes.
scope and isBeforeUnload are read when the block is registered; changes
after mount are applied on the next registration cycle.
Registers a navigation blocker. The callback must return a Promise
The caller is responsible for providing a stable
callbackreference (e.g. via useCallback) — registrations only change when the reference changes.scopeandisBeforeUnloadare read when the block is registered; changes after mount are applied on the next registration cycle.