Web_programming
1.15K subscribers
353 photos
14 videos
125 files
1.21K links
Sharif web programming
If you have any questions, please feel free to ask(@yumcoder)
Download Telegram
هنگامی که یک تابع داریم که می خواهیم برای اجرایهای متوالی آن محدویت بگذاریم از debounce استفاده میکنیم

For those of you who don't know what a debounce function does, it limits the rate at which a function can fire. A quick example: you have a resize listener on the window which does some element dimension calculations and (possibly) repositions a few elements. That isn't a heavy task in itself but being repeatedly fired after numerous resizes will really slow your site down. Why not limit the rate at which the function can fire?

#JavaScript #Debounce Function