RenderTree in Blazor
We have seen how we develop components, manipulate the UI, build forms, and optimize our components and project for faster and more efficient performance. It’s now time to go deep and learn how Razor components are compiled and how Blazor manipulates the UI you see in the browser.
We will start by learning a bit more about the difference between Single-Page Applications (SPAs) and traditional web apps in terms of how the UI works, then we will go deeper by defining RenderTree in Blazor and what happens to .razor
files at compilation. After covering the theory, we will develop a simple component using purely C# and learn about how to take advantage of this advanced scenario, helping us build more performant apps.
This chapter covers some advanced topics that may not be directly relevant for practical applications of Blazor and day-to-day work, but they can help you gain a deeper understanding of how Blazor works under the hood and go through scenarios...