interface / @typed/navigation/Blocking

BlockNavigation

Exposes the currently blocked transition as reactive state plus an isBlocking projection.

Package version
1.0.0-beta.7
Category
Blocking state
Since
1.0.0

Import

import { BlockNavigation } from "@typed/navigation/Blocking";

Signatures

export interface BlockNavigation extends RefSubject.Filtered<Blocking> {
    readonly isBlocking: RefSubject.Computed<boolean>;
}

Why

A dialog or other UI can observe unsaved-work navigation without owning the navigation service or coupling state to a renderer.

Ownership and lifetime

The RefSubject and handler registration belong to the Scope that runs {@link useBlockNavigation}. Closing that Scope cancels an outstanding block and unregisters the handler.

Property: isBlocking

Reactively reports whether one transition awaits settlement.

Property: isBlocking: Why

A renderer can show blocking UI without sampling or owning the Navigation service.

Property: isBlocking: Ownership and lifetime

The blocker Scope owns this reactive member; observing it does not extend that Scope.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source