I have a couple of questions about the react under the hood:
When I load an app written in react for the first time, all the components that are part of the app are rendered and a tree-like object is built.
Every time there is a change in a component, it is re-rendered and its descendants are re-rendered.
Do I understand the following correctly: When the component is re-rendered, it is re-created and its node in VDOM is updated (like the new node). If I wrap the component in react.memo(), then it will compare props and if they have changed, then only then it will be re-rendered. SO react compares props for a component that has memo(), and this prop for this component is in VDOM and if they differ, then he adds a new node to VDOM, and if they do not differ, then he takes an old snapshot, as it were?