Skip to content

ui-router-effect / pendingRef

Function: pendingRef() ​

ts
function pendingRef(router): SubscriptionRef<
  | Transition
| undefined>;

Defined in: ui-router-effect/src/pending-ref.ts:23

The pending-transition ref for a router — one per router instance, attached lazily.

It holds the newest transition still in flight, and undefined when none is. The first caller creates the ref and registers the single onStart hook that feeds it; the transition's promise clears it when that transition settles, whether it succeeds, errors or is aborted, unless a newer one has started. A transition already running on first use counts as pending. Kept out of RouteSnapshot, whose every value is a settled route.

Parameters ​

ParameterType
routerUIRouter

Returns ​

SubscriptionRef< | Transition | undefined>