1. Home
  2. Computer Science MCQs
  3. REACT
  4. What is the virtual DOM in React?

Added 2 Nov 2026

What is the virtual DOM in React?

  1. A browser feature that replaces the real DOM
  2. An in-memory copy React diffs to update the real DOM Correct answer
  3. A CSS layer that hides components until they load
  4. 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

MCQSEXAM

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

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More REACT MCQs

Practise all REACT MCQs

Similar MCQs