Closed
Description
in the current implementation, it is assumed that useEventCallback
will receive a react synthetic event. Is there any reason behind this assumption?
this does not let me use the callback on my custom event handlers.
For instance:
const MyInput = ({ onChange, value }) => (
<input onChange={e => onChange(e.target.value)} value={value} />
)
I can't use useEventCallback
on MyInput
because the type signature of onChange
there is:
type onChange = (val: string) => void