Skip to content

Types: AfterRouteHook()

ts
type AfterRouteHook: (to, context) => MaybePromise<void>;

Represents a function called after a route change has occurred.

Parameters

ParameterTypeDescription
toResolvedRouteResolvedRoute The resolved route the router has navigated to.
contextAfterRouteHookContextAfterRouteHookContext The context providing functions and state for the routing operation.

Returns

MaybePromise<void>

Possibly a promise that resolves when the hook's logic has completed.