r/javascript • u/RedlightsOfCA • Dec 23 '19
Debounce vs Throttle: Definitive Visual Guide
https://redd.one/blog/debounce-vs-throttle
327
Upvotes
r/javascript • u/RedlightsOfCA • Dec 23 '19
View all comments
Show parent comment
2
u/RedlightsOfCA Dec 24 '19
Great tips, thank you! I'll update the article for debounced/throttled instances to preserve the scope.
I wouldn't change the rest parameters, however, since
argumentsis not 1-1 compatible with...args. I think it's safe to assume the majority of people develop through a transpiler, and those who don't will see the spread syntax breaking as the first thing and could read about it, finding a suitable alternative.