Skip to content

Topics

Jump to a topic.

Search questions

Find a question by title, tag, or summary.

Chapter 02

State and updates

How component state behaves: each render sees a snapshot, updates are queued and batched, objects and arrays are replaced rather than mutated, and state is structured so nothing is stored twice.
  1. 010Why does state still hold the old value right after you set it?Coremedium
  2. 020How does React batch state updates, and when do you need an updater function?Coremedium
  3. 030When should you use useReducer instead of useState?medium
  4. 040Why must React state be updated immutably?medium
  5. 050How do you decide where state lives and what not to store?medium