React Compiler: Automatic Memoization

Hands-on practice for this lecture. Work through the exercises and quizzes to reinforce what you've learned.

1

Exercise 1 of 1

What React Compiler Does For You

See why inline objects and functions break React.memo — then see the stable-reference pattern React Compiler generates automatically at build time.

Profile — no memoization (what compiler receives)

Unrelated tick: 0

Click Tick. ProfileCard re-renders even though config/handlers haven't changed — every render creates new object and function references.

ProfileCard (memo'd) renders: 1

theme: dark / compact: false

Test Your Understanding

Multiple choice — select an answer to see the explanation.

1 / 4

What does React Compiler fundamentally do differently from manual useCallback/useMemo?