4 ms·
> React diffs the state object when `setState` is called, determining which part of the DOM to update. Er, what? That's not true at all, even for class-based c
by phailhaus 3y ago
> React diffs the state object when `setState` is called, determining which part of the DOM to update.
Er, what? That's not true at all, even for class-based components. `setState` merely queues up another render of the function and its children. There is no diffing, except for the new DOM returned against what is currently rendered.