1๐
โ
I had resolved the issue by passing $axios
as the first argument in the asyncData
functions
export default {
async asyncData({ $axios, params }) {
const user = await $axios.$get(params.id);
return { user };
}
};
๐คSyam kumar KK
0๐
You forgot to pass extra prop โ params
, and then you have an access to params
.
export default {
async asyncData({ app, params }) {
const user = await app.$axios.$get(params.id);
return { user };
}
};
๐คMajkon
Source:stackexchange.com