I cant fetch data from API using asyncData
<template>
<v-list>
<v-list-tile>
<h1>Test {{category}}</h1>
</v-list-tile>
</v-list>
</template>
export default {
data () {
return {
category: null
}
},
asyncData() {
return axios.get('/category')
.then((res) => {
return {category: res.data}
})
}
}
I am using an example from official docs https://nuxtjs.org/api/ but with no success. Endpoint 100% percent correct.