You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code currently looks like this:
const getTrendingMovies = () => {
GlobalApi.getTrendingVideos
.then(resp => {
console.log(resp.data.results);
setMovieList(resp.data.results);
})
}
GlobalApi.getTrendingVideos is a function, but it's missing parentheses for invocation. To fix this, it should be called as GlobalApi.getTrendingVideos().
The code currently looks like this:
const getTrendingMovies = () => {
GlobalApi.getTrendingVideos
.then(resp => {
console.log(resp.data.results);
setMovieList(resp.data.results);
})
}
GlobalApi.getTrendingVideos is a function, but it's missing parentheses for invocation. To fix this, it should be called as GlobalApi.getTrendingVideos().
Corrected Code:
const getTrendingMovies = () => {
GlobalApi.getTrendingVideos().then((resp) => {
console.log(resp.data.results);
setMovieList(resp.data.results);
});
};
The text was updated successfully, but these errors were encountered: