Anatomy of a Re-Render

Every yellow flash is a re-render. Interact with the demo, spot what shouldn't be flashing, then open the solution tab to see the fix.

1

Exercise 1 of 1

Push State Down

Fix unnecessary re-renders by moving state closer to where it is used.

interact to see yellow flashes →
Dashboard
renders: 1

ExpensiveChart renders: 1

Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec

DataTable renders: 1

NameScoreStatus
Alice98
Bob76
Carol54⚠️

💡 Click the dark mode toggle. ExpensiveChart and DataTable re-render even though they don't use darkMode at all.