React · Junior · Question 2 of 75
What is the virtual DOM in React?
- 1A hidden copy of the browser engine where React renders the page in advance
- ✓Correct answer: A JS description of the UI: React diffs it with the previous one and applies only the difference
- 3A browser-built-in API that speeds up any DOM tree operations
Explanation
When rendering, components return a tree of React elements - plain JS objects. React compares the new tree with the previous one (reconciliation) and applies minimal changes to the real DOM. It isn't a browser API or a copy of the browser.