0

I have been asked that, what do we see on the browser? Is it the real DOM or Virtual DOM?

I think what we see on the browser is the real dom as virtual dom is said to be in memory representation, but Iam not sure about it. can anyone please help me in this?

  • 1
    Does this answer your question? [What is Virtual DOM?](https://stackoverflow.com/questions/21965738/what-is-virtual-dom) – phuzi Mar 30 '23 at 09:30

1 Answers1

0

Users do not see a virtual DOM, but it is used as a representation of the actual DOM in memory.

When we use REACT to build a web application, a virtual DOM is generated based on the current state of the application.

Once the virtual DOM is updated it is compared with the previous DOM and determines which parts are needed to be changed in the real DOM. React updates the actual DOM in the most efficient possible way.