When using nuxt.js fetch()
, whenever I reload the page, it does not fetch it again. Only if I come from a router-link. How do I force it to actually refetch from my API?
export default {
async fetch() {
const data = await this.$axios.$get(`/users/${this.$route.params.name}`)
this.user = data
},
data() {
return {
user: []
}
}
}
Every page I look at, they always show placeholders on page refresh, WHILE refetching from their APIs, why does my Nuxt.js app not do that when refreshing? It is just not refetching the data from my API, which is weird.