the only time I find it to be required is when passing in callbacks to custom hooks with props that may change and you'll notice immediately because the callback will continuously run
You may rely on useMemo as a performance optimization, not as a semantic guarantee. In the future, React may choose to “forget” some previously memoized values and recalculate them on next render, e.g. to free memory for offscreen components. Write your code so that it still works without useMemo — and then add it to optimize performance.For example, something like this should work correctly even without useCallback, but you would be constantly re-subscribing for no good reason.
const callback = useCallback(...);
useEffect(() => {
const unsubscribe = subscribe(callback);
return () => unsubscribe();
}, [callback]);