I have below function
const handleClick = React.useCallback(
(value) => {
dispatch({ value });
},
[dispatch]
);
My question is, in my case, is it necessary to have useCallback
?
how React determines if the dependency is changed when the dependency is a function?