Render function

The render function is called by React every time its state changes as part of its reconciliation process. The render function is expected to return the component's visual tree. Confusingly, it isn't the real HTML DOM, but rather the component-specific slice of the final Virtual DOM.

In React, you don't respond to state changes imperatively and immediately. Instead, you manage the component state, and every time render is called, you simply render the entire visual tree according to the current state snapshot.

You must be asking yourself what that code is in the App component render function. That's JSX, which you will learn about in the next section. In this chapter, you're going to implement the following components:

Get Hands-On Full-Stack Web Development with ASP.NET Core 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.