in React JS by
Q:
How Virtual DOM works?

1 Answer

0 votes
by

The Virtual DOM works in three simple steps.

Whenever any underlying data changes, the entire UI is re-rendered in Virtual DOM representation.

vdom

Then the difference between the previous DOM representation and the new one is calculated.

vdom2

Once the calculations are done, the real DOM will be updated with only the things that have actually changed.

vdom3

Related questions

0 votes
asked Dec 8, 2020 in React JS by SakshiSharma
0 votes
0 votes
asked May 20, 2020 by GeorgeBell
...