State shape: free-recall review
Free-recall prompts across the state-shape unit. Answer each in your own words first, then reveal the model answer and compare.
Retrieval beats re-reading. For each prompt, say or write a full answer from memory before you open the model answer — the effort of recall is what makes the shape decisions stick.
Reconstruct the unit’s core decisions — derived vs stored, server cache vs client state, colocation, URL as source of truth, and normalization — without looking back at the lesson.
- 01What is the test for whether a value is state or derived, and why does storing a derived value cause bugs?
- 02Why is 'server cache vs client state' the most important shape question, and how does it change your tooling?
- 03What does colocation mean, why does it make an app faster, and how is it different from 'lift state up'?
- 04Which kinds of state belong in the URL, and what breaks when you keep them only in useState?
- 05When should client state be normalized, and what exactly is the tradeoff against a nested shape?
- 06Walk through the ordered questions a senior asks to decide where any value belongs.
If you could reconstruct each answer from memory, you hold the unit’s spine: derive what is derivable so it cannot drift, recognise fetched data as server cache and give it to a cache library, colocate private client state at its lowest reader instead of hoisting it, put shareable view-state in the URL, and normalize relational data only when you mutate it. Now when you open a PR and see a value stored next to its source, or a fetched payload in useState, or filters that vanish on refresh — you reach for the decision tree first, not the library docs.
Something unclear?
Ask a question about this lesson. Questions are anonymous and go straight to the author to make the lesson better.