DEV Community

Discussion on: Ever heard of debouncing in in javascript , What is it ?

Collapse
 
aarone4 profile image
Aaron Reese

I had to read the post twice to understand what you were saying. For clarity for other readers, the debouncedFunction fires on every keyup however the first thing that happens is to clear and reset the timer so the inner get data function does not get called until the outer function HAS NOT fired for 300ms.
I know you have said you will keep throttling for another post but the key difference is that throttling would fire the inner function immediately and then ignore any other calls during the timeout period.

Collapse
 
ashishjshetty profile image
Ashish J shetty

Thanks for the feedback !. will definitely update the content to make it more understandable .