React - useEffect에서 데이터 페칭
useEffect에 직접 async를 주지말자! 수정 전! useEffect(async()=>{ const Popularmovies = await axios.get(`https://api.themoviedb.org/3/movie/popular?api_key=${API_KEY}&language=en-US&page=1`); const top_rated = await axios.get(`https://api.themoviedb.org/3/movie/top_rated?api_key=${API_KEY}&language=en-US&page=1`); console.log(Popularmovies.data.results) const movies = Popularmovies.data.results const top= t..
2020.08.30