Creating a Razor class library
In our project, we create reusable components and store them in the Shared
folder. These components can be utilized by other components, such as layout components or NavMenu
. Additionally, we can encapsulate Razor components within the Razor class library, making them accessible for use across various projects.
The components in the Razor class library are not specific to a single project, making them suitable for use in any Blazor project, whether it be Blazor Hybrid, Blazor WebAssembly, or Blazor Server apps.
In this book, we construct Razor components utilizing Bootstrap. Numerous open-source Razor class libraries built on top of Bootstrap can be found on GitHub. Several of these libraries are sufficiently robust for commercial product development. Below are a few examples:
BootstrapBlazor
: https://github.com/dotnetcore/BootstrapBlazorBlazorise
: https://github.com/Megabit/BlazoriseHavit.Blazor
: https://github.com...