Effects
Sync components with the world outside React: when effects run, dependencies, cleanup, StrictMode, fetching without races, layout effects and useEffectEvent.
So far every component has been a pure function: data in, UI out, plus event handlers that run when the user does something. Some code fits neither place. A chat room must connect while it is on screen and disconnect when it leaves. A page title must follow the unread count. A timer must tick. This phase teaches effects: code that keeps a component in step with something outside React.
Effects are the most misunderstood part of React, so we go slowly and precisely: exactly when an effect runs (after the commit, usually after the browser paints), what the dependency array really compares, when cleanup runs, and why StrictMode runs your effects twice in development. You'll learn to think in synchronising instead of "on mount" and "on unmount", and you'll see a real race condition in data fetching and two ways to fix it.
Just as important, you'll learn when not to write an effect: most effects in real codebases are unnecessary and cause extra renders and bugs. The phase ends with useLayoutEffect for measuring before paint, useInsertionEffect for CSS-in-JS libraries, and React 19.2's useEffectEvent for reading the latest values without re-running an effect.
Practise this phase
Hands-on exercises: write the code, see your page live, and press Check to have it tested automatically.