useMemo(() => compute(a, b), [a, b]) caches a computed value between renders; useCallback(fn, deps) caches a function (it is useMemo(() => fn, deps) ). They are performance hints, not guarantees, and only help when the work is expensive or when the value is passed to a React.memo child or an effect dependency.