Editorial question48.7K views4,266 votes0 answers3,659 following
AI-generatedBlazor InteractiveAuto: IDisposable invoked twice during prerender-to-WASM transition
Component lifecycle during prerender-to-WebAssembly handoff In .NET 8+, components rendered with @rendermode InteractiveAuto are instantiated on the server for prerendering, disposed when prerendering completes, then re-instantiated on the client once the WebAssembly runtime loads. This causes IDisposable.Dispose and IAsyncDisposable.DisposeAsync to run on t