Introducing Blazor Hybrid App Development
In .NET MAUI, there is another way to build the user interface, which is using Blazor. Blazor can be used as a single-page application (SPA) framework to develop web applications. It can also be used to develop .NET MAUI apps in the form of a Blazor Hybrid app. The building block of Blazor is the Razor component. Using Blazor and Blazor Hybrid, we can reuse Razor components between native apps and web apps. Compared to the XAML UI, the Blazor UI can achieve higher reusability, which includes both native apps and web apps. In this chapter, we will introduce what Blazor is and explain its usage in different scenarios. We will also introduce the Razor component and how to develop a Blazor Hybrid app using Razor components.
We will cover the following topics in this chapter:
- What is Blazor?
- How to create a .NET MAUI Blazor project
- How to create a new Razor component