# Debouncing : What You Need to Know

When I was learning web development I came across the jargon “DEBOUNCING” . I looked for more details about debouncing but unfortunately most of the technical blogs out there are not for beginners. So, let us try to understand what it is ? And Why do we need it ?

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1733412338940/f36c7a1a-cd70-488e-ab99-609743641d62.jpeg align="center")

*Did you ever notice what happens when you start searching for a product in an e-commerce site, say for example amazon ?*

As you can see in above image when I typed *google* in search bar , it started showing me all the products having *“google”* in it’s name. ***<mark>But what will happen if I don’t stop and continuously keep typing in the search bar ?</mark>***

*When you will continuously keep typing in search bar , it will not show you anything but once you stop typing, it will show you the relevant products.*

### What exactly is happening?

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1733413412689/288d7fd7-afe0-4b8e-b072-bbbb1de110ff.jpeg align="center")

As shown in above image, when you type something in the search bar , a request goes out to backend that returns name of all the products filtered by “XYZ”

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1733413825505/8150ce50-a5d4-4b0f-9677-5efeb7314e86.jpeg align="center")

*But why request was not sent as soon as when you typed “X”, why it waited for sometime ?* **The reason behind this is a feature called debouncing**. In simple terms it can be defined as delayed sending of requests. This feature is needed to avoid unnecessary calls to backend. Otherwise, the number of requests reaching out to backend would be enormous.

### What should not happen?

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1733415582558/42dd94a0-77b9-4f03-8d10-22eac2622b03.jpeg align="center")

I hope this explains what debouncing is and why it is needed.
