• Two-step "arm to confirm" guard for irreversible actions. The first call to arm() flips confirm true for timeoutMs; acting again while confirm is true is the real confirmation. It auto-disarms after the timeout (and on unmount) so a button left armed can never fire a destructive action later. Pair with onBlur={disarm} so navigating away cancels the armed state.

    Parameters

    • timeoutMs: number = 3000

    Returns { arm: () => void; confirm: boolean; disarm: () => void }