1let [ posts, setPosts ] = useState([])
2 useEffect(() => {
3 async function getResults() {
4 const results = await axios('https://jsonplaceholder.typicode.com/posts');
5 setPosts(results.data)
6 }
7 getResults()
8 },[])
9console.log(posts)