I'm running into an issue where I'm not receiving any data from my Axios async calls. I've configured my calls in my Nuxt config as follows:
modules: [
'@nuxtjs/axios',
],
And in my component, it's set up like this:
<template>
<div>
{{audioUrls}}
{{ip}}
</div>
</template>
<script>
export default {
name: "Audio",
data() {
return {
audioUrls: null,
}
},
async asyncData({ $axios }) {
const ip = await $axios.get('http://icanhazip.com')
return { ip }
},
mounted() {
this.audioUrls = this.asyncData()
}
}
</script>
Despite no errors being reported, I haven't been able to receive any data in my app. Am I overlooking something important?