Skip to content

lit-ui-router-effect / routeRef

Function: routeRef()

ts
function routeRef(router): SubscriptionRef<RouteSnapshot>;

Defined in: route-ref.ts:82

The route ref for a router — one per router instance, attached lazily.

No plugin and no router-configuration wiring: the first caller creates the ref and registers the single onSuccess hook that feeds it, and both live as long as the router does. onSuccess is the only hook a later transition cannot supersede, so every value the ref ever holds is a settled route.

Parameters

ParameterType
routerUIRouter

Returns

SubscriptionRef<RouteSnapshot>