Understanding Basic Blazor Components
In this chapter, we will look at the components that come with the Blazor template and start to build our own components. Knowing the different techniques used for creating Blazor websites will help us when we start building our components.
Blazor uses components for most things, so we will use the knowledge from this chapter throughout the book.
We will start this chapter with theory and end by creating a component to show some blog posts using the API we created previously, in Chapter 3, Managing State – Part 1.
In this chapter, we will cover the following topics:
- Exploring components
- Learning Razor syntax
- Understanding dependency injection
- Changing the Render mode
- Figuring out where to put the code
- Lifecycle events
- Parameters
- Writing our first component