in JAVA by
How React works? How Virtual-DOM works in React?

1 Answer

0 votes
by

React creates a virtual DOM. When state changes in a component it firstly

runs a “diffing” algorithm, which identifies what has changed in the virtual

DOM. The second step is reconciliation, where it updates the DOM with the

results of diff.

The HTML DOM is always tree-structured — which is allowed by the

structure of HTML document. The DOM trees are huge nowadays because of

large apps.

The Virtual DOM is an abstraction of the HTML DOM. It is lightweight and

detached from the browser-specific implementation details.

Related questions

0 votes
asked May 20, 2020 by GeorgeBell
0 votes
asked Jan 27, 2020 in JAVA by rahuljain1
0 votes
asked Jul 2, 2019 in React JS by Venkatshastri
0 votes
asked Nov 14, 2020 in JAVA by rajeshsharma
...