In NuxtJs app i got data() on server side by AsyncData() method.
For example, I need to delete one entry and refresh the page without restarting the browser.
In pure Vue, I would write an ajax method to update the data from the server after removal. Usually this method is the same as for the initial load and it is located in "mounted". But NuxtJs can't I access a method async Data() again. Or can I?
async asyncData({$axios, params}) {
const {data} = await $axios.$get(`/topics/${params.id}`)
return {
topic: data
}
},
-------------------------
async deletePost(id) {
await this.$axios.$delete(`/topics/${this.topic.id}/posts/${id}`)
// bad idea - hard reset
window.location.reload(true)
//how refresh by asyncData()?
},