-2
I’m having a little problem here on the call for an API, code:
const [fullCurrency,setFullCurrency] = useState('');
function carregaMoedas(){
const res = api.get('currencies?apiKey=do-not-use-this-key');
setFullCurrency(res.results);
}
useEffect(()=>{
carregaMoedas();
console.log(fullCurrency)
},[]);
The above code string in the console.log returns
{"_U": 0, "_V": 3, "_W": {"_U": 0, "_V": 1, "_W": {"config": [Object], "data": [Object], "headers": [Object], "request": [XMLHttpRequest], "status": 200, "statusText": undefined}, "_X": null}, "_X": null}
I’ve tried everything here, but I can’t fix it. Thanks guys! Full link of the api https://free.currconv.com/api/v7/currencies?apiKey=do-not-use-this-key