debounce
and Compose
By Moro
Your component is getting a lot of their attention…
What!?
Each time I type, we are calling the server…
Let’s solve this using debounce…
Are you kidding?
We need two callbacks. One to update the query, and the other to search…
Inside of the SearchInputText component we need the following lines:
Producer
We also need to define the consumer using LaunchedEffect
Consumer
Each time the user types, we will have a temporal barrier to trigger less times the server…
By Moro