Components that compare render trees

The first part of the React core is the package called react. This package is what we interface with directly when writing React components. It's a small APIā€”the only time we really use it is when we're creating components with state and we need to extend the Component class.

There's a lot going on under the hood with the react package. This is where the render tree resides and is responsible for efficiently rendering UI elements. Another name for the render tree is the virtual DOM. The idea is that you only have to write JSX markup that describe the UI elements that you want to render while the render tree takes care of everything else:

What you see in this diagram are the components that your code directly interfaces with, and the render tree that takes care of handling presentational changes that result from components that change state. The render tree and everything that it does for you is the key value proposition of React.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.196.59