score:1

Accepted answer

it is a simple mistake =)

api.js:

const api = axios.get({
    baseurl: 'https://api.covid19api.com',
})

in the above code, where you define your api, you should use axios.create instead of axios.get.

at the moment, if you look carefully, in your react component you're basically calling axios.get().get() which doesn't make sense.


Related Query

More Query from same tag