function Homepage() {
const url = `https://cloud.iexapis.com/stable/stock/aapl/quote?token=token`;
useEffect(()=>{
axios.get(url)
.then(res => {
console.log(res.data);
})
.catch(err => {
console.log(err);
})
}, [])
}
I'm trying to fetch data from the api, but why this code gives me two identical responses.
How should I fix it, so I can get only one response from api?