Tech News
← Back to articles

The Useless UseCallback

read original related products more articles

28.07.2025 — React, JavaScript, useCallback, Performance — 5 min read

#1: The Uphill Battle of Memoization

#2: The Useless useCallback

I thought I'd written enough about memoization by now, but I feel there is one pattern I'm seeing a lot lately that makes me think otherwise. So today, I want to look at useCallback , and to some extent useMemo , in situations where I think they are totally pointless.

Why memoize?

There's usually only two reasons to create a memoized version of a function with useCallback or a value with useMemo :

Performance optimization

Something is slow, and slow is usually bad. Ideally, we'd make it faster, but we can't always do that. Instead, we can try to do that slow thing less often.

In React, a lot of the time, the slow thing is re-rendering of a sub-tree, so we'd like to ideally avoid that if we think it's "not necessary".

That's why we sometimes wrap components in React.memo , which is an uphill battle mostly not worth fighting, but still, it's a thing that exists.

... continue reading