Why when I call the "handle Search" function for the first time I get "undefined" but the second time I get my result.
const handleSearch