1👍
✅
You can create mutation in your vuex store
mutateActive: (state, val) => (state.renameActive = val),
and vuex action that you will call:
setActive({ commit }, val) {
commit('mutateActive', val);
},
and in your method call vuex action and pass the value:
addTab() {
this.$store.dispatch('setActive', true)
}
Source:stackexchange.com