function / @typed/react/Router

useRoute

Decoded parameters through Typed’s matcher. The default None fallback stays live outside the ambient mount.

Package version
1.0.0-beta.13
Category
function

Import

import { useRoute } from "@typed/react/Router";

Signatures

export declare function useRoute<Rt extends Route.Route.Any, ER = never>(route: Rt, options?: RouteOptions<Rt, ER>): AsyncState<Option.Option<Route.Route.Type<Rt>>, Matcher.RouteNotFound | Matcher.RouteDecodeError | Matcher.RouteGuardError | ER>;

Other public imports

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

Source