Tell me how to correctly type the scrollHandler function in this case.
`
useEffect(() => {
document.addEventListener('submit', scrollHandler);
return () => document.removeEventListener('scroll', scrollHandler)
})
const scrollHandler = (e: React.UIEvent<??>) => {
console.log(e)
}
` Code example on CodeSandBox here
I have tried React.UIEvent React.UIEvent and etc. but it doesn't work, it throws an error :(
Thanks in advance to everyone
const scrollHandler = (e: Event) => { console.log(e) }