Because each useMemo and useCallback call has overhead: storing dependencies, comparing them on every render, and managing the cache. For cheap computations, this overhead exceeds the saving.
When useMemo and useCallback Actually Hurt React Performance
Why is memoization not free in React?
The answer
More FAQs in When useMemo and useCallback Actually Hurt React Performance
Yes. Memoization is not free, and using these hooks for cheap computations, without a memoized child, or with wrong dependencies adds overhead without benefit. The default should be no memoization, added only where measured.
No. useCallback only helps if the child receiving the function is wrapped in React.memo. If the child is not memoized, it re-renders anyway, so the stable reference provides no benefit and the overhead is wasted.
Missing dependencies cause stale values; too many cause recomputation on every render. Wrong dependency arrays undo the memoization, so you have overhead without the benefit you expected.
Still have questions?
Browse all our FAQs or reach out to our support team
Want to upskill yourself?
Your learning library
Small steps. Big possibilities.
Find your next course. Build something great.