()
| 6 | const [cards, setCards] = useState([]) |
| 7 | |
| 8 | const fetchData = async () => { |
| 9 | let a = await fetch("https://jsonplaceholder.typicode.com/posts") |
| 10 | let data = await a.json() |
| 11 | setCards(data) |
| 12 | console.log(data) |
| 13 | } |
| 14 | |
| 15 | useEffect(() => { |
| 16 | fetchData() |