What is the impact of using useCallback on the component's memory usage?
useCallback can improve performance by preserving function identity between renders, but it does not reduce baseline memory usage. React keeps the cached function and dependency list so it can return the previous function when dependencies have not changed, and the function passed to useCallback is still created during rendering.