I want to access state.session
in instance.js
from records_view.js
. How is this accomplished?
store/modules/instance.js
For me I had vuex modules, but needed a mutation to update STATE in a different file. Was able to accomplish this by adding THIS
Even in the module you can see what global state you have access to via console.log(this.state)
const mutations = {
MuteChangeAmt(state, payload) {
//From user module; Need THIS keyword to access global state
this.state.user.payees.amount = payload.changedAmt;
}
}