Demystifying setState()
summary
Explains that setState is an asynchronous batched queue not an immediate mutation, that multiple calls (five, ten, even a hundred) get merged into one reconciliation, and that relying on merged objects breaks increments unless using functional setState which receives previous state and props. Describes React’s diff of JavaScript UI objects (virtual DOM) and mentions Fiber prioritizes updates to delay off‑screen work. Practical takeaway: use functions for state derived from prior state.
AI-written summary · about
chapters (6)
- 0:00Start
- 2:37What is UI?
- 16:56COMPOSITION
- 21:02setState ASYNCHRONOUS
- 23:07Functional setState
- 24:38Behold Fiber!








