Debouncing is a technique that is used to improve the performance of our website by optimizing time-consuming tasks.
For e.g. sending a request to the server do not fire so often, which may result in slow processing and a bad user experience on our web page.
Debouncing is most commonly used to build the search functionality on the websites. Generally, we send requests to the server on the occurrence of each key press event which may block the thread as so many requests will be in pending state. In that situation, we can use debouncing to avoid sending frequent requests instead send the request only when the user stops typing for some time.