Then… it compares it with the previous one…
This comparison is called… diffing.
After that…
React updates only the parts… that actually changed.
This makes the app… much faster.
Because… updating the real DOM… is expensive.”
Diffing + Reconciliation
“Let’s go a little deeper.
Whenever state or props change…
React creates a new Virtual DOM tree.
Then it compares it… with the old one.
This step is called… diffing.
After finding the differences…
React updates only those parts…