Tag: Blazor Framework

State Management in Blazor Web Assembly with ASP.NET 6.0

A short tutorial on Blazor WASM State Management in ASP.NET 6.0

Create a SQL Database Windows Docker Container associated with an ASP.NET Core 3.1 Blazor App

The following is assumed: 1) You have .NET Core 3.1 installed on your computer. Go to https://dotnet.microsoft.com/download/dotnet-core to download and install .NET Core 3.1. 2) You have Docker for Windows installed on your computer. Refer to https://docs.docker.com/docker-for-windows/install/ for instructions on how to install “Docker Desktop on Windows”. Let’s get started. Right-click on the whale docker icon in…
Read more

How to Use Templated Components in Blazor

What is a templated component? Templated components are components that accept one or more UI templates as parameters. This is then used as part of the rendering logic. This allows users to author higher-level components that are highly reusable. I am going to cover a list component that allows a user to specify a template…
Read more

How Routing in Blazor Works?

Introduction In Blazor, the route template provided to the accessible components makes the routing possible. A Blazor component (which is a Razor file with .razor extension) with @page directive, when compiled, generates a class. This generated class is given a RouteAttribute that specifies the route template. At runtime, the router looks for matching route templates…
Read more

How Inheritance in Blazor Works?

The ComponentBase Class When a Blazor component is created, it should inherit from the ComponentBase class. The first reason for so doing is that it implements the IComponent interface which Blazor uses to locate components throughout the project. Secondly, ComponentBase contains important lifecycle methods. Let’s continue with the GetStarted Blazor solution that we created here…
Read more

Learn Chained Bind in Blazor

What is Chained bind in Blazor? Multiple levels of binding occur at the same time in a “chained bind”. In a chained bind, the event handler and the value must be specified separately i.e. @bind syntax can’t be used to implement chained bind in the page’s element. A parent component however can use the @bind…
Read more