As we learned from this lesson, ReactDOM.render() takes first argument, creates a corresponding tree of nodes and than add this tree to the DOM. So why html file is not updated after rendering a JSX element?
Thank you in advance!
HTML has DOM, which is what you see on a webpage.
Good, I like how you take thinking steps yourself trying to figure things out
.render() is only the initial mount.
The html is rendered by the browser, resulting in the DOM. This involves graphical rendering and more. Its a very complicated process. So we don’t manipulate the html file, but result of the file being rendered.
Of course reactJS will have to update the DOM, but by using the virtual DOM, reactJS minimizes interactions with the DOM.
I am sure there are good in-depth articles on how this works.
Thank you so much for your answer