Reconciliation is the algorithm React uses to diff two virtual DOM trees and determine the minimal set of DOM operations needed to update the UI after a state change.
When state or props change, React renders your component again to produce a new tree of React elements. Reconciliation is the process of comparing this new tree with the previous one to figure out what actually changed.
React uses two key heuristics to achieve O(n) diffing instead of O(n³): elements of different types produce entirely different subtrees, and the key prop lets developers hint which child elements remain stable across renders.
After diffing, React produces a minimal list of DOM mutations (insert, update, remove) and applies them in a single batch during the commit phase. This avoids expensive full-page re-renders.
Interview framing: define Reconciliation in one sentence, then explain one concrete runtime behavior and one common pitfall with a short code example.