I have the next state in my component;
const [value, setValue] = useState(0);
Also inside this component i have another component as a child:
<Child setValue={setValue} />
How you can notice there i send setState as a prop.
Question: How to wrap this setState in useCallback hook and after that also to pass it as a prop in <Child/>?
I want to do this to optimize the component especially to avoid re-renders for Child component.