coding180 icon
Coding180

What is the working principle of virtual (Virtual) DOM?

Home > Interviews > Javascript


robort - 2022-10-05 05:58:40

The Virtual DOM works in three steps:

Step 1: Whenever any data in the React App changes, the entire UI is re-rendered in the Virtual DOM representation.

Step 2: Calculate the difference between the previous DOM representation and the new DOM.
Step 2

Step 3: Once the computation is done, the real DOM updates only those things that were changed.
Step 3


user

Robort Gabriel

Lagos, Nigeria

Freelance Web Developer, Native Android Developer, and Coding Tutor.

Skills
  • UI / UX
  • JavaScript
  • Python
  • PHP
  • Kotlin
  • Java
  • Bootrap
  • Android
  • Laravel