Css – useDetectScroll Triggers an Infinite Loop When <header> Element is Sticky
I'm experiencing an issue with the useDetectScroll hook from @smakss/react-scroll-direction in my React component. When I make my element sticky using position: sticky, the useDetectScroll hook gets triggered in an infinite loop, which causes the element that should hide on…