4

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 ...

Get Web Development with Blazor - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.