Answer the question
In order to leave comments, you need to log in
How to save vuex state between transitions in nuxtjs?
I have a Nuxtjs application in SSR mode. In it, the vuex state is reset on any change in the route. I want to keep it. To do this, there are a couple of plugins that save the state in localstorage and restore it. The problem is only in the order of its restoration
. For example, I want to draw data in the template, I call the vuex action in the fetch method:
async fetch({ store, route }) {
await store.dispatch("items/fetch_exact", route.params.slug);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question