import React, { useEffect, useState } from 'react';
import tmdb from './tmdb';
import MovieRow from './components/MovieRow';
export default () => {
const [movieList, setMovieList] = useState([]);
useEffect(() => {
const loadAll = async() => {
//Pegando a lista total
let list = await tmdb.getHomeList();
setMovieList(list);
}
loadAll();
}, []);
return(
<div className="page">
<section classname="lists">
{movieList.map((item, key) => (
<MovieRow/>
))}
</section>
</div>
);
}
I’m building a clone of Netflix using React, but I’m getting this error midway into my project, can someone help me out?