Vuex and dynamic states. Is possible?
问题 I have a store in Vuex with an empty state const state = { data: { } }; And a simple mutations for test to change value or add new data const mutations = { changeOrAdd(state, {key,value}) { state.data[key] = value; } }; If I do a commit to changeOrAdd , it is added to state BUT it doesn't have reactivity. I did a simple trick to change a default value const state = { data: { change: 0 } }; And in the mutation: const mutations = { changeValueAttr(state, { key, value }) { state.data[key] =