Hands-on practice for this lecture. Work through the exercises and quizzes to reinforce what you've learned.
Exercise 1 of 1
React.memo breaks when object props are recreated inline — useMemo gives them a stable reference.
Unrelated state: 0
ThemePanel (memo'd) renders: 1
Props haven't changed — but memo can't tell, because the object reference is new.
Click Tick. ThemePanel flashes every time — even though theme content never changes. React.memo compares object references, not values: {} !== {}.
Multiple choice — select an answer to see the explanation.
What does "shallow equality" mean in the context of React.memo?