I think that for the problem mention, you would be better just doing debouncing on your text field instead, no need to perform the api call. The theory behind debouncing is simple, each time the user enters a key you delay a function call by some amount, if another key is pressed the last function is canceled and a new call is delayed. Until one of the calls executes, then you perform the call to the API.
I think that for the problem mention, you would be better just doing debouncing on your text field instead, no need to perform the api call. The theory behind debouncing is simple, each time the user enters a key you delay a function call by some amount, if another key is pressed the last function is canceled and a new call is delayed. Until one of the calls executes, then you perform the call to the API.
I just got to know debouncing from you. Thanks man.
Great stuff! It's a really useful concept to know!