Use useCallback when you need to memoize a function to prevent unnecessary renders, particularly in scenarios where the function is passed to child components.