Overview of the Rendering Process in Blazor

Rendering is the process of displaying visual controls to the user. In Blazor, the rendering of each Razor component happens after a specific lifecycle event. When the component loads for the first time, the visual controls are rendered after the OnParametersSet event (or its async version) is executed.

Once a Razor component has been rendered, it will need to be rerendered every time there is a change in any of its visual components. There are some ways the rendering behavior can be configured, and we will cover how to do it. A reason for overriding the default behavior may, for example, be refreshing the data on the page immediately after some data changes in the code in situations where it doesn’t happen by default.

We will use the following project to demonstrate rendering behavior in Blazor. This project has been set up with some examples that allow us to see how the rendering behavior of a Razor component can be affected.

Get hands-on with 1200+ tech skills courses.