Skip to content

lit-ui-router-effect / RouterRefControllerOptions

Interface: RouterRefControllerOptions<T>

Defined in: router-ref-controller.ts:11

Options for RouterRefController.

Extends

Type Parameters

Type Parameter
T

Properties

PropertyTypeDescriptionInherited fromDefined in
equals?(a, b) => booleanComparer deciding whether the selected value changed. Defaults to Object.is; pass Equal.equals for Data structs, or a structural comparer for plain objects.RefControllerOptions.equalsref-controller.ts:49
initialValue?TValue exposed on .value before the first read of a ref that is only resolved on hostConnected (see RefSource) — that is, before the host connects, and on any host that renders while disconnected (SSR). Refs given directly are read at construction instead, so they never need it.RefControllerOptions.initialValueref-controller.ts:42
onChange?(value) => voidInvoked (before host.requestUpdate()) whenever the selected value changes — and once on every host (re)connect. Use for effects such as resetting component state from route params.RefControllerOptions.onChangeref-controller.ts:33
router?UIRouterExplicit router instance. When omitted, the controller discovers the router from the nearest enclosing <ui-router> element on hostConnected (via UIRouterLitElement.seekRouter). Given, the route is read at construction, so .value is live before the host connects.-router-ref-controller.ts:20
runtime?RefRuntimeThe runtime the subscription fiber is forked on, and refs are read with. Defaults to Effect's default runtime; pass the app's ManagedRuntime to keep everything on one.RefControllerOptions.runtimeref-controller.ts:56