I am using react. I am making a custom scrollbar and I need to get the current window.pageYOffset, but useEffect cannot work with it. How can I get the
window.pageYOffset
useEffect