Concept Flow - Virtual DOM and diffing mental model
Initial Render
Create Virtual DOM Tree
Render Real DOM from Virtual DOM
State or Props Change
Create New Virtual DOM Tree
Diff Old and New Virtual DOM
Calculate Minimal DOM Updates
Apply Updates to Real DOM
User Sees Updated UI
The app first creates a virtual DOM tree, renders it to the real DOM, then on changes creates a new virtual DOM, compares it with the old one, and updates only what changed in the real DOM.