Typing Callbacks in React's Synthetic Event System
function onInput(event: React.SyntheticEvent) {
event.preventDefault();
// do something
}
const inp = <input type="text" onInput={onInput} />;
function onInput(event: React.SyntheticEvent) {
event.preventDefault();
// do something
}
const inp = <input type="text" onInput={onInput} />;