useMemo Only Helps When the Dependencies Stay Stable_
React memoization depends on identity, not visual similarity. If upstream references keep changing, `useMemo` often adds complexity without delivering the expected win.
useMemo feels like it should cache "the same value," but React does not compare business meaning. It compares dependency identity. If an array or object is recreated on every render, useMemo sees a new dependency and recomputes anyway.
That is why so many memoization attempts do nothing measurable.
It is usually not worth it for tiny computations that exist only to make the code feel optimized.
The Better Mental Model
Good memoization starts upstream. First stabilize the inputs or stop recreating data structures unnecessarily. Then profile. Then add useMemo only where it reduces real work.
That matters even more as React tooling changes. The React Compiler can automate some optimization paths, but it does not remove the need to understand identity and data flow.
Practical Rule
Do not add useMemo because a value is "derived." Add it because profiling shows the recomputation or downstream re-render cost is worth trading for the extra complexity.