juniorblazor
Blazor is a UI framework using C# instead of JavaScript. Three models: Server (SignalR), WebAssembly (in browser), Static SSR (.NET 8).
Blazor Server: C# runs on the server, UI updates via SignalR WebSocket. Fast startup, thin client, but latency and requires persistent connection. Blazor WASM: .NET Runtime in the browser via WebAssembly. Works offline, but large download (~5-15MB). Static SSR (.NET 8): renders on the server as HTML, no WebSocket. Interactive islands: individual interactive components on the page.
<!-- Blazor component (Counter.razor) -->
@page "/counter"
<h1>Counter</h1>
<p>Current count: @currentCount</p>
<button @onclick="IncrementCount">Click me</button>
@code {
private int currentCount = 0;
private void IncrementCount() => currentCount++;
}
// .NET 8: render mode per-component
<Counter @rendermode="InteractiveServer" />
<Counter @rendermode="InteractiveWebAssembly" />
<Counter @rendermode="InteractiveAuto" />When yes
C# teams without JS expertise, internal tools, admin panels, dashboards
When no
Public SEO-critical sites (SSR is better). Mobile apps (use MAUI). If the team knows React/Vue — they'll be faster
Interview tip
.NET 8 Blazor United — all render modes in one project. InteractiveAuto: server on first load → WASM after download.