Answers for "how to fetch data in react from api"

3

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 in react from api"

Browse Popular Code Answers by Language