Blazor and Web Components

The Blazor framework enables you to build flexible and fast web applications with C# instead of JavaScript. The framework uses WebAssembly-based .NET runtime (client-side Blazor) and server-side ASP.NET Core (server-side Blazor). A Blazor app can invoke JavaScript functions from .NET and .NET methods from JavaScript code.

To call into JavaScript from .NET, use the IJSRuntime abstraction. The InvokeAsync method takes an identifier for the JavaScript

As it is possible to use Javascript with Blazor, it is easy to use Web Components with Blazor, too. The following tutorial will show you how to add our Grid Web Component and data bind it to a WeatherForecast web service within a Blazor web application:

After following the steps in the tutorial you will have the following output:

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply