What is the difference between Real DOM and Virtual DOM?

Posted by Jennifer | Updated on

What is the difference between Real DOM and Virtual DOM?

Below are the main differences between Real DOM and Virtual DOM:

Real DOMVirtual DOM
Updates are slowUpdates are fast
DOM manipulation is very expensive.DOM manipulation is very easy
You can update HTML directly.You Can’t directly update HTML
It causes too much of memory wastageThere is no memory wastage
Creates a new DOM if element updatesIt updates the JSX if element update

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers