Implementing Razor Components
In the previous chapter, we explored Blazor routing and layout and, subsequently, built a navigation framework by establishing our app’s routing and layout. Upon setting up the navigation framework, we crafted top-level pages. The implementation of Razor pages allows for password database navigation, akin to the XAML version. While Razor pages are indeed Razor components, they are not reusable. In this chapter, we will introduce the creation of reusable Razor components. Furthermore, we will delve into data binding and the Razor component lifecycle to foster a comprehensive understanding of these aspects. Armed with this knowledge, we will optimize our code by converting duplicate code into reusable Razor components. Ultimately, we will use the Razor components to implement CRUD operations within our app.
We will cover the following topics in this chapter:
- Understanding Razor components
- Creating a Razor class library ...