There is a solution to this issue that is common in javascript and implemented by lodash. Take a look at using debouncing to wait for the user to stop entering text before trying to update. Here is an analogy of how it works from someone more eloquent than me:
Think of it as "grouping multiple events in one". Imagine that you go
home, enter in the elevator, doors are closing... and suddenly your
neighbor appears in the hall and tries to jump on the elevator. Be
polite! and open the doors for him: you are debouncing the elevator
departure. Consider that the same situation can happen again with a
third person, and so on... probably delaying the departure several
minutes.
To do this in react you would import lodash and set onChange
to be _.debounce(function(), delay)
where function() would setState after the given delay.
This demo does a great job demoing how debounce works in react (just open the console and watch it as you type).
If you want to learn about best practices with debounced functions read the answers in this SO post.
Ps: you can also try throttling, though I think debouncing will be more desirable for your specific use case. The post with the analogy on debouncing also has one on throttling. To use it you would replace _.debounce(function, int)
with _.throttle(function, int)
in the examples