-
-
Save ashikka/5ed2ceb0e7b1a7daaf2122faa96c9481 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const [searchResults, setSearchResults] = useState([]); | |
| const [searchTerm, setSearchTerm] = useState[""]; | |
| const handleChange = event => { | |
| setSearchTerm(event.target.value); | |
| } | |
| async function getResults(searchTerm){ | |
| setSearchResults(await getPhotos(searchTerm)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment