How to use popmotion-debounce - 1 common examples

To help you get started, we’ve selected a few popmotion-debounce examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Popmotion / popmotion / packages / popmotion-on-screen / src / on-screen.js View on Github external
const init = () => {
    window.addEventListener('scroll', throttle(checkAll, 1000 / 30)); // 30fps
    window.addEventListener('resize', debounce(measureAll));

    trackViewport = true;
};

popmotion-debounce

Prevent firing a function until `x` milliseconds after it was last called.

MIT
Latest version published 8 years ago

Package Health Score

56 / 100
Full package analysis

Popular popmotion-debounce functions