If you are making API calls to fetch the search data as shown below, then, to make it performant you should not make the API call for every character that is input by the user, but only after the user input stops for some milliseconds.
https://medium.com/@anuhosad/debouncing-events-with-react-b8c405c33273