Render Modes in Blazor

Render Modes is the fourth chapter of the free Blazor tutorial. It explains where your components run: on the server or in the browser, and when they can react to the user.

What each lesson covers:

  • Server Rendering: The four render modes, Static SSR with streaming and enhanced navigation, Interactive Server with @rendermode, SignalR, circuits and reconnection, component and app state, prerendering and PersistentComponentState.
  • WebAssembly & Auto: Interactive WebAssembly setup, @rendermode and the runtime flow, Interactive Auto and its switch to WebAssembly, state across render modes, and choosing a render mode.

Every code box compiles your components with the real Razor compiler and runs them on .NET 10 in your browser.

Lessons in this section

  1. Server Rendering

    Server render modes in Blazor: the four render modes, Static SSR with streaming and enhanced navigation, Interactive Server with @rendermode, SignalR and circuits, reconnection, component and app state, prerendering and PersistentComponentState.

    • Tell the four Blazor render modes apart
    • Explain how Static SSR, streaming and enhanced navigation work
    • Use Interactive Server with @rendermode and explain circuits
    • Explain component state, prerendering and [PersistentState]
  2. WebAssembly & Auto

    Browser render modes in Blazor: Interactive WebAssembly project setup, @rendermode, the runtime and rendering flow, Interactive Auto and its server-to-WebAssembly switch, state across render modes and how to choose a render mode.

    • Set up Interactive WebAssembly with a Client project
    • Explain how the .NET runtime runs components in the browser
    • Configure Interactive Auto and explain the switch to WebAssembly
    • Keep state across render modes and choose the right mode