useCallback will return a memoized version of the callback that only changes if one of the inputs has changed.
useCallback
inputs
16.8.0
https://react.dev/reference/react/useCallback
useCallbackwill return a memoized version of the callback that only changes if one of theinputshas changed.