What is the virtual DOM in React?
A
A browser feature that replaces the real DOM
B
An in-memory copy React diffs to update the real DOM
Correct answer
C
A CSS layer that hides components until they load
D
A server that pre-renders every page in advance
Correct answer
B. An in-memory copy React diffs to update the real DOM
14 views
⚔️
Challenge a friend on REACT
Same MCQs, timed, live leaderboard. Send the link on WhatsApp – no sign-up needed.
Create challenge
Explanation
React builds a lightweight virtual DOM tree, compares it with the previous one, and applies only the differences to the real DOM, which keeps updates efficient.
Reference
Asked in: React Interviews, Frontend Developer Tests
Doubts & discussionNot sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ
‹ Previous MCQ When useEffect is given an empty dependency array ([]), the effect runs: Next MCQ › In React, 'lifting state up' means: