[]previous and next page

BlockerState

What useBlocker returns.

What useBlocker returns.

Import#

ts
import type { BlockerState } from "@shadow-js/router";

Signature#

ts
interface BlockerState {
  /** `"blocked"` while a transition is held. */
  status(): "idle" | "blocked";
  /** The held transition, if any. */
  transition(): BlockedTransition | undefined;
  /** Lets the held transition through. */
  proceed(): void;
  /** Drops the held transition. */
  reset(): void;
}

Members#

Name Type Description
status status(): "idle" | "blocked" "blocked" while a transition is held.
transition transition(): BlockedTransition | undefined The held transition, if any.
proceed proceed(): void Lets the held transition through.
reset reset(): void Drops the held transition.