Answer the question
In order to leave comments, you need to log in
How to get the state from another Vuex module inside a mutation and not an action?
I give such a clarification, since everywhere there is the same copy-paste of this one:
context.rootState.instance.session
there is no context in mutations (right :D ?).
Answer the question
In order to leave comments, you need to log in
import store from './path/to/store'
export default {
mutations: {
yourCoolMutation() {
store.state.another.something // Тут я могу ошибиться
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question