Updated: 17 January 2025
Notes
- A .NET frontend (SPA) web framework supporting both server and client side rendering.
- Uses C#.
- Client side – uses WebAssembly.
- Server side – uses ASP.NET Core and communicates with client via SignalR.
- Blazor apps are based on components. A component in Blazor is an element of UI, such as a page, dialog, or form.
- Components are .NET C# classes built into .NET assemblies.
- Blazor vs Razor
Project templates
- Blazor Server (.NET 7 and below). Seemingly Blazor Server apps are supported in .NET 8 without any code changes.
- Blazor Web (.NET 8 and above)
- Blazor WebAssembly
Create a Blazor app
For Blazor Server (.NET 7 and below)
dotnet new blazorserver -o TodoList
Blazor WebAssembly
dotnet new blazorwasm -o TodoList