Can it be that TypeScript DOM types for events and React Event types don\'t go well with another?
Look at this code:
useEffect(() => { const o