Open
Description
how to implement as nuxt AsyncData, for example:
async asyncData({ route }) {
try {
const { results }= await axios.get('/blog/', { page: route.query.page || '1' });
return {
items: results,
query: {
page: route.query.page || '1'
}
};
} catch (e) {
return {
items: [],
query: {
page: route.query.page || '1'
}
}
}
},
watchQuery: true,
and then inside the template call items without use store
==================
and how to use it here?
Metadata
Metadata
Assignees
Labels
No labels