Back

GreatFrontend Layout

Debounce

Amaresh S M· Front-end engineer
JSTS·Medium·15 mins

Debouncing is a technique used to control how many times we allow a function to be executed over time. When a JavaScript function is debounced with a wait time of X milliseconds, it must wait until after X milliseconds have elapsed since the debounced function was last called.

You almost certainly have encountered debouncing in your daily lives before (e.g. when entering an elevator). Only after X duration of not pressing the "Door open" button (the debounced function not being called) will the elevator door close.

Project
src
index.ts
utils.ts
registry.tsx
package.json
README.md
tsconfig.json
/
Clicks: 0