Skip to main content

Command Palette

Search for a command to run...

What is the virtual DOM? How does react use the virtual DOM to render the UI?

Updated
1 min read
What is the virtual DOM? How does react use the
virtual DOM to render the UI?

The virtual DOM (VDOM) is a programming concept where an ideal, or “virtual”, representation of a UI is kept in memory and synced with the “real” DOM by a library such as ReactDOM. This process is called reconciliation. During reconciliation, React calculates what exactly has changed without involving the actual DOM and then ensures that the actual DOM only repaints the necessary data.

Sources:

Virtual DOM and Internals –. (n.d.). React. https://reactjs.org/docs/faq-internals.html

More from this blog

R

Raja Muhammad Asher - Senior Software Engineer - Full Stack Developer

157 posts

Full Stack Developer with a passion for building web applications. PHP, Node.js, Laravel, ExpressJS, MySQL, MongoDB. Love collaborating & making a difference