Question · JavaScript and React course · Module 1: React Basics

Benefits of Virtual DOM

What is the main benefit of Virtual DOM in React?

Answer options

  • It automatically compresses CSS and JavaScript files in the project
  • It completely replaces the real DOM and renders the page without a browser
  • It minimizes the number of operations on the real DOM by updating only the changed elements
  • It stores user data in the browser cache
Show the answer

Correct answer:

  • It minimizes the number of operations on the real DOM by updating only the changed elements