Page tries to render before data is loaded from API - React

It would help if you wrapped your axios response in a promise and change your state in the then function since it seems like your state is updating before your API call is over. Something like the followng would help.

await getCoinsData()
    .then(fetchedCoinData => {
        setData(fetchedCoinData))
        setLoading(false)
    });