Components in Blazor
Components are the main building blocks of each Blazor application. Each component is a self-contained piece of the user interface (UI) and its related logic, and comprises a dynamic part of the application UI. A Blazor application is basically a set of components placed together, each of which has its own responsibility within the UI, and the interaction of these components builds up the full app that we are aiming for in this book.
In this chapter, we are going to understand the concept of components from scratch, create our first component, and then use it. We will discover the available mechanisms to pass data between components by introducing parameters, cascading parameters, and event callbacks.
After that, we will look at the component life cycle events and how we can leverage them during the component’s lifetime. Finally, we will add some CSS styling for a better look.
In this chapter, we will cover the following topics:
- Understanding...