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

1

How to fetch data from an api axios

import axios from "axios"

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

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

Browse Popular Code Answers by Language