Please enable JavaScript.
Coggle requires JavaScript to display documents.
JavaScript :<3: - Coggle Diagram
JavaScript :<3:
Programming Practices :explode:
Debounce
About
Improves browser performance.
For time consuming computations which are invokes frequently for example, multiple clicks, scroll, and so on affect browser performance.
Debouncing ensures these events are not fired frequently.
Implementation
A
timeout
triggers the event after a delay. Before triggering the timeout clear the timeout. In this way even if the user had fired the event that event will not be fired.
References
Debouncing in JavaScript | GeeksForGeeks
Debounce with React JS | StackOverflow
Sandbox - See it in action :fountain_pen:
Concepts 🎓
First Class Function
First-class Function | MDN
- Functions (named or anonymous) as variables
Callback Functions
High Order Functions
Common Errors and Pitfalls
SyntaxError: missing = in const declaration