Frontend & browser·Rendering and the browser pipeline
you describe the whole interface for the new state and something else works out the smallest set of DOM changes.
Virtual DOM
Also calledvdom
An in-memory tree of what the UI should look like, diffed against the previous one to produce the minimal set of real DOM operations. Its value is the programming model — you write a function of state instead of a sequence of mutations — rather than raw speed, since hand-written DOM updates are always faster in principle. The cost is that the diff itself runs on the main thread for every update, and on a large tree that cost is measurable.