Blazor .NET 8 static prerender reinitializes components on InteractiveAuto fallback
0 reputation · 14 Sept 2026, 03:33 UTC
Goal
Configure specific components in an otherwise static .NET 8 Blazor page to use @rendermode InteractiveAuto, allowing the page to prerender as static HTML before the client circuit establishes interactivity.
Uncertainty
InteractiveAuto starts as InteractiveWebAssembly and can fall back to InteractiveServer if the WebAssembly runtime does not load. During prerender there is no circuit, so component initialization may run once while generating static HTML and again after the circuit connects. It is unclear whether DOM state, field values, or component properties from the prerender pass are transferred to the interactive instance, or whether every lifecycle method must be written as idempotent by default.
Questions
- Does .NET 8 preserve prerendered component state when InteractiveAuto transitions to InteractiveServer after a WebAssembly load failure?
- What is the supported approach for reconciling prerendered output with the post-hydration component instance without executing non-idempotent side effects twice?