Enode — API Reference
    Preparing search index...

    Function usePopGuard

    • Lets a pushed view intercept its own user-initiated pop — the header back button, Escape and the hardware/OS Back (incl. the iOS edge swipe). The guard runs before the pop; returning false cancels it. Programmatic useDrawerStack().pop() / close() are never guarded, so the view pops itself that way once the user confirms.

      Parameters

      • guard: PopGuard

        read fresh on every pop attempt (no memoization needed)

      Returns void

      No-op in the root view: a root's dismissal is guarded by the host's onDismissAttempt / onClose instead. A refused hardware Back re-arms the entry's back guard, so the next Back asks again.