LabsLab 01 · Beginner · 10 min
State and lifecycle
Compare component state, parameters, event callbacks, and circuit-scoped state.
Two lifetimes, one page
Component count: 0
Scoped count (lives for the browser tab): 0
Scoped service instance: d9b57d8e
Lifecycle: Prerendered component: browser interop is not available yet.
Why it works
The child raises an EventCallback; the parent owns the value. A scoped service survives route navigation within a Blazor Server circuit. A fresh page load creates a new circuit.
Try it yourself
Increment both values, visit another lab, and return. Predict which value survives. Then reload the page.