I have a nuxt.js application where fetch () hook is used fetch data from API, as below:
async fetch() {
await this.$store.dispatch('articles/getArticlesDetails', this.$route.params.id)
}
and I want to use the data returned by API on the client-side and tried to get it in mounted and it is undefined in mounted.
Is there any other efficient way to get and use the data for further making an API call on the client-side .