0
Challenge · 88React Internals
Render Phase
Internalsused in ~45% of apps
Every interview that goes past hooks asks what actually happens between 'I called setState' and 'the screen changed'. The render phase is the first half of that answer — and getting it right (pure, in memory, interruptible) is what separates someone who uses React from someone who understands it.
Core idea. The render phase is React calling your components to compute a new tree of elements — a description of the UI in memory. It must be pure (no side effects, no DOM writes), and in concurrent React it can be paused, restarted, or thrown away before anything is shown.
poke it, drag it,
try to break it
try to break it
no slides here.
you drive.
you drive.
Playground, this isn't a screenshot
Trigger
Render
Commit
render = call components → build element treeComponent tree (React calls each function)
1<App />
2<Counter />
3<Doubler />
New element tree (a value in memory — not the DOM)
Empty. Trigger a render to watch React build the tree.
Real DOM0changes only on commit
The render phase is React calling your components to build a new element tree — pure, in memory, interruptible. The DOM box never moves until you commit. Try interrupting a render mid-flight: the half-built tree is discarded with zero consequence, because render produced no side effects.
↑ play a little first, then dig in