useWindowScroll
Listens for scrolls the window to a particular place in the document.
Usage
import useWindowScroll from 'funda-ui/Utils/useWindowScrollx';
const App = () => {
const [scrollData, windowScrollUpdate] = useWindowScroll({
performance: ['debounce', 500], // "['debounce', 500]" or "['throttle', 500]"
handle: (scrollData) => {
// do something
console.log(scrollData);
}
});
};