Showing posts with label throttle. Show all posts
Showing posts with label throttle. Show all posts

Friday, June 27, 2014

The Difference Between Throttle and Debounce

I've always wondered what the difference is between the debounce() and throttle() Lodash functions. It turns out, there is no real difference — throttle() depends on debounce(), which handles all the complex logic of timing function execution. So what does throttle(), do exactly? It sets up the leading and the trailing edge of the timeouts.