type-alias / @typed/navigation/Navigation

NavigationHandler

Selects optional post-commit work for a committed navigation event.

Package version
1.0.0-beta.7
Category
Navigation hooks
Since
1.0.0

Import

import type { NavigationHandler } from "@typed/navigation/Navigation";

Signatures

export type NavigationHandler<R, R2> = (event: NavigationEvent) => Effect.Effect<Option.Option<Effect.Effect<unknown, never, R2>>, never, R>;

Why

Applications can update route-dependent state after history and currentEntry agree without making every subscriber run for every event.

Ownership and lifetime

Registration captures the handler’s Effect context and is owned by its Scope. Selected follow-up effects run after commit and do not alter the already committed destination.

Other public imports

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

Source