I have a smartsearch widget, If I type fast (which is the common scenario when someone types a name she knows), I want the request after the last letter typed to go through, not one request for each character I type.
If I fire the Ajax request in the onChange event of an INPUT tag, and I type "abcd" quick, I want to send to the server just "abcd".
Anything built into React around this?
Asked
Active
Viewed 58 times
0

Dharman
- 30,962
- 25
- 85
- 135

Itay Moav -Malimovka
- 52,579
- 61
- 190
- 278
-
use `debouncing` of `loadash`, [`debounce`](https://lodash.com/docs/4.17.15#debounce) – Code Maniac Sep 06 '19 at 02:00
-
@CodeManiac exactly what I was looking for, put as an answer – Itay Moav -Malimovka Sep 06 '19 at 02:03
-
No need as this just an comment, there are already answers present on so :) – Code Maniac Sep 06 '19 at 02:05
-
@CodeManiac the duplicate answers you posted use the word "debounce", I would never guess this is the term I need to use, hence I would never find it (as I would use the wrong search key words). – Itay Moav -Malimovka Sep 06 '19 at 20:56