skip to Main Content

Javascript – Scroll event listener function gets triggered as many as how far I scrolled

const handleReadChat = useCallback(() => { const entry = refEntries.current; if ( entry.scrollTop > entry.scrollHeight - 800 && activeRoom && conversations?.content?.length > 0 && activeRoom.unread ) { setTimeout(() => { dispatch(readConversationByRoom(activeRoom.id)); console.log("executed", activeRoom.unread); }, 3000); } }, [activeRoom, conversations?.content]); useEffect(()…

VIEW QUESTION

Html – Smooth scroll transition between child and parent

<html> <style> .App { font-family: sans-serif; text-align: center; .child { padding-left: 100px; padding-right: 100px; height: 100vh; overflow-y: scroll; } .child::-webkit-scrollbar { display: none; } } </style> <body> <div class="App"> <div class="parent"> <div class="child"> <p> Lorem ipsum dolor sit amet, consectetur…

VIEW QUESTION
Back To Top
Search