Answer the question
In order to leave comments, you need to log in
How to force a Store refresh in Vuex?
After changing the state, I have to reset one state:
this.$store.commit('clients/SET_CURRENT_CLIENT', ID); // Изменить стейт
this.$store.commit('budget/SET_SETTING', {setting: "dealerShipId", value: 0}); // Обнулить настройку
this.$store.watch(
(state) => {
return state.budget.settings
},
() => {
this.$store.dispatch('budget/GET')
},
{
deep:true
}
)
Answer the question
In order to leave comments, you need to log in
deep:true
obj[key] = val
of doing obj = { ...obj, [key]: val }
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question