I've console.log'd the data being returned from my API and I get:
fetchedData: {…}
confirmed: Object { value: 7650696, detail: "https://covid19.mathdro.id/api/confirmed" }
deaths: Object { value: 425869, detail: "https://covid19.mathdro.id/api/deaths" }
lastUpdate: "2020-06-13T04:33:11.000Z"
recovered: Object { value: 3630249, detail: "https://covid19.mathdro.id/api/recovered" }
<prototype>: Object { … }
<prototype>: Object { … }
Then, when I console.log(data.confirmed)
I receive undefined, even though it's listed right there. I'm using hooks in my app, though I'm not sure that has anything to do with it because I'm able to console the data just fine. The problem is when I try to access the properties in data.
https://codesandbox.io/s/wizardly-banzai-2n2xq?file=/src/App.js