-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
Description
In the docs its says:
To debounce means "call this at most once per N ms". All outward function calls get collated into a single inward call, and only the latest (most recent) arguments as passed on to the debounced function.
What you're doing is throttling, not debouncing.
lodash.throttle:
Creates a throttled function that only invokes
funcat most once per everywaitmilliseconds.
Creates a debounced function that delays invoking
funcuntil afterwaitmilliseconds have elapsed since the last time the debounced function was invoked.
And while on the topic, a (real) @debounce would be a great addition.
developit, ephys, Bibliofile, zenyr, jgierer12 and 5 more