Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Render Modes in Depth: Static SSR, InteractiveServer, InteractiveWebAssembly, InteractiveAuto and Prerendering
A render mode is set on the component definition, where it is used or for the whole app, propagates to child components, and an interactive component cannot switch to another interactive mode inside; parameters from a Static parent are serialized to JSON in the HTML. We add a WebAssembly quote calculator to the Bookstore panel and show the ChildContent error, a silently dropped EventCallback, turning prerendering off and why everything in .Client is visible in the browser.
Prerendering and State Persistence: the Double-Load Problem, [PersistentState] and Circuit State
An interactive component with prerendering runs as two instances, so its data is loaded twice; .NET 10's [PersistentState] embeds the prerendered value in the page and hands it to the interactive instance, and the same attribute keeps state when a circuit pauses and resumes. In the Bookstore panel we measure and remove the double API call and the table flash, use RestoreBehavior for data that must stay fresh, and show that state persisted for WebAssembly is plain JSON in the page source.