score:0

Accepted answer
const scrollToMainContent = () => {
        window.removeEventListener('scroll', scrollToMainContent);
        scroll.scrollToBottom();
}
useEffect(() => {
        window.addEventListener("scroll", scrollToMainContent);
}, [])

Related Query

More Query from same tag