48 CZ-PRG (GMT+1)
US-NYC (GMT-5)
Blazor Web App (Server rendered)
MICROSOFT .NET WEB DEVELOPMENT

SPA and Reactive Web

Blazor is Microsoft's web framework for building interactive applications with C# and Razor. Its component model makes it a natural fit for single-page experiences and reactive user interfaces.

Single-Page Application (SPA)

A SPA loads an application shell once, then updates its content as users navigate and interact. Blazor's client-side routing can move between app pages without a full document reload, much like React, Angular, or Vue.

Reactive Web UI

A reactive interface reflects its current data and state. When a component's C# state changes, Blazor renders the affected UI so the page stays in sync without manually editing the DOM.

THE FRAMEWORK

What is Blazor?

Blazor brings C# and the .NET ecosystem to interactive web development. Developers compose pages from Razor components that combine HTML markup with C# logic. Forms, validation, navigation, and data-driven content can share the same language and application code.

WHERE COMPONENTS RUN

Blazor hosting models

Blazor supports different ways to run interactive components, each with a different balance of client resources and server connectivity.

Blazor WebAssembly

The .NET runtime and app code are downloaded to the browser and run there through WebAssembly. The UI can run without a persistent connection to the server, while still calling backend APIs when the app needs them.

  • Runs client-side in the browser
  • Useful for apps that need client-side execution

Blazor Server

Components run on the server. Browser events travel over a SignalR connection, typically using WebSockets, and Blazor sends UI updates back to the page. This keeps the initial client download small and lets server code access backend resources.

  • Runs C# component logic on the server
  • Uses a live connection while interactive components are active
HOW REACTIVITY WORKS

Components respond to state

Razor components own parameters and internal state. Events such as typing into an input update that state; Blazor's renderer then computes and applies the necessary UI changes. Most event handlers trigger a render automatically, while StateHasChanged() is available when code needs to request one explicitly.

1. BindConnect input to C# state.
2. ChangeUpdate state from an event.
3. RenderRefresh the affected UI.
TRY IT

Reactive data binding

Hello, Blazor!

The greeting updates as the bound C# value changes.

QUICK REFERENCE

How the terms fit together

Term What it means
Single-Page Application (SPA) An application architecture that updates page content without full document reloads during internal navigation.
Reactive Web UI A user interface that responds to changes in component state and data.
Blazor Microsoft's .NET framework for building web UI with C#, Razor components, and HTML.
This app uses interactive server rendering. Its Weather page requests data after the visitor grants browser location access.
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.