Answers for "How to fetch data from an api react"

4

How to fetch data from an api react

const fetchData = () => {
return fetch("https://randomuser.me/api/")
      .then((response) => response.json())
      .then((data) => console.log(data));}
Posted by: Guest on June-07-2021

Code answers related to "How to fetch data from an api react"

Browse Popular Code Answers by Language