Reputation: 95
I have a Nuxt 2 project. When I make a single API request, in the Network tab it is doubled: one as fetch type and one as xhr type. Am I missing some settings in nuxt.config.js?
export default {
computed: {
...mapGetters({
averageAttendances: 'dashboard/stats/averageAttendances',
averageAbsences: 'dashboard/stats/averageAbsences'
})
},
fetch() {
this.fetchStats()
},
methods: {
...mapActions({
fetchStats: 'dashboard/stats/fetchStats'
})
}
}
Upvotes: 0
Views: 43