React has two main principles:

React-dom and React-native can be used on different platforms. For example, setstate is defined in React, but implementation is implemented in React-DOM.

The second react-dom input nested loop.

Render then goes through the virtual diff process and commit updates the result of the update validation to the DOM

The React rendering process actually involves JSX creating the React element as a virtual DOM node, calling the reactdom. render method to create a virtual DOM tree, which is then mapped to the real DOM and rendered by the browser. When state and props change, render will be called again to generate a new virtual DOM tree. Diff algorithm is used to calculate the difference between the old and new virtual DOM, and then render the difference to the real DOM

The React class render method is a bebel parsed node of the React Virtual DOM, which is rendered into a virtual DOM tree by reactDOM.

This method is the reactDOM method

The React component’s new life cycle: static method representatives are private, the current constructor has its own function and cannot be called by an instance. In ES6, the class represents a prototype, and static methods need to be added to represent static methods.