Skip to content

Route lifecycle instance #4

/lifecycle/{id:int} implements IBrouterRoute directly - the router auto-discovers it on the page it instantiates - and logs every OnActivated / OnRenavigated / OnDeactivated callback below.

Trigger the callbacks

id (route)
2
?tab (query)
-

This route is a singleton (not keep-alive), so switching between ids re-commits the same component instance: OnInitialized does not re-run, and OnRenavigated is the "user arrived here again" signal, carrying both locations. Navigating away fires OnDeactivated with reason Disposing (its synchronous part is guaranteed to run before Dispose); coming back mounts a fresh instance - new # in the title - whose first OnActivated has IsFirstActivation set.

Descendant handler (manual registration)

RouteContext.IsActive: True · activations seen: 0 · renavigations seen: 0

This card is a child component, not the page: it took the cascaded BrouterRouteContext as a [CascadingParameter] and called Register(this), so it receives the exact same lifecycle callbacks as the auto-discovered page above - the manual escape hatch for Content fragments, Found-template pages, or any nested component.

Event log (survives disposal)

No events yet - this page's first OnActivated is about to appear.