Skip to main content

useChaynsHistoryBlock

Callable


  • 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.


    Parameters

    Returns void