Answer the question
In order to leave comments, you need to log in
How to use store.action in router vuejs?
Good day. We need to make a state change in the vuex store using beforeEach/afterEach in the routes. I connected the storage itself to the routes file, I can easily get the state using store.getters.getterName, but you can’t call actions in the same way, logging store to the console showed that actions are available by name _actions. But it turns out that they cannot be called in such a way that the state in the repository changes. How can you call actions in routes?
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