1 of 9

debounce

and Compose

By Moro

2 of 9

Your component is getting a lot of their attention…

What!?

3 of 9

Each time I type, we are calling the server…

4 of 9

Let’s solve this using debounce…

Are you kidding?

5 of 9

We need two callbacks. One to update the query, and the other to search…

6 of 9

Inside of the SearchInputText component we need the following lines:

Producer

7 of 9

We also need to define the consumer using LaunchedEffect

Consumer

8 of 9

Each time the user types, we will have a temporal barrier to trigger less times the server…

9 of 9

By Moro