React hook useEventCallback
npm install use-event-callbackuseEventCallbackAimed to be easier to use than useCallback and solve problems raised in this ticket.
useEventCallback doesn't need any dependencies list.
The returned function should not be used during rendering.
``jsx
import useEventCallback from 'use-event-callback';
const Input = () => {
const [value, setValue] = useState('');
const onChange = useEventCallback((event) => {
setValue(event.target.value);
});
return ;
}
``