Managing State
Shape state so bugs can't happen: no contradictions or copies, derive what you can, lift shared state, reset with keys, and put each piece where it belongs.
By now you can give a component memory with useState, update objects and arrays, and build forms. As an app grows, the hard question is no longer *how* to store state but *what* to store and *where*. Most React bugs in real projects are state-shape bugs: two values that disagree, a copy that went stale, a number stored that should have been calculated, a value kept in the wrong component.
This phase gives you the rules that experienced React developers follow without thinking. You'll learn to choose a state structure with no room for contradictions, to compute values during render instead of storing them, to lift state up so two components share it, and to control exactly when React keeps or throws away a component's state, including the key trick for resetting a form.
You'll finish with one-way data flow (props down, events up) and a checklist for deciding where every piece of state should live: in one component, in a shared parent, in the URL, in a form, or in a server-data cache. Effects are not needed for any of it; they come in Phase 7.
Practise this phase
Hands-on exercises: write the code, see your page live, and press Check to have it tested automatically.