Skip to content
React·Intermediate·Conceptual·1 min read

What should come before reaching for useMemo or useCallback?

Short interview answer

Profiling the actual slow interaction with React DevTools Profiler to confirm there's a real, measurable cost, and checking whether state placement or component structure could remove the unnecessary work entirely instead of just memoizing around it.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to React performance optimization

Related questions