Answer
Both memoize across renders based on a dependency array; they differ in what they return:
useMemo(fn, deps)returns the memoized value thatfnproduces (e.g. an expensive computation or a stable object/array).useCallback(fn, deps)returns the memoized function itself.useCallback(fn, deps)===useMemo(() => fn, deps).