Eliminate Unnecessary Re-renders
Eliminate Unnecessary Re-renders
MediumFrontend0% accepted
A dashboard re-renders every widget whenever any value changes, causing jank. Explain how React re-renders propagate and how to stop wasteful renders with React.memo, useMemo, and useCallback — and, importantly, when NOT to use them.
Approach
A parent render re-renders all children. React.memo skips a child if props are shallow-equal; useMemo caches values; useCallback caches function identity. Don't over-memoize cheap components.
More Frontend problems
Browse all coding problems →Scenarios & Expected Answers
No example scenarios for this problem.
Sign in to continue
Create a free account to view answers and mark progress.
- Free forever — no credit card
- Theory Q&A with detailed answers
- Points, streaks & leaderboards