MCPcopy Create free account
hub / github.com/codemistic/Web-Development / searchMovies

Function searchMovies

Movie Database/src/App.js:11–15  ·  view source on GitHub ↗
(title)

Source from the content-addressed store, hash-verified

9 const [movies, setMovies] = useState([]);
10 const [searchTerm, setSearchTerm] = useState("");
11 const searchMovies = async (title) => {
12 const response = await fetch(`${API_URL}&s=${title}`);
13 const data = await response.json();
14 setMovies(data.Search);
15 };
16
17 useEffect(() => {
18 searchMovies("Batman");

Callers 1

App.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected