This question maybe the most noob outwhere, but I cannot find out.
First, assign variable from store state
this.currentLoadNode = this.$store.state.loadNode
Modify variable
this.currentLoadNode.shift();
EDIT to avoid misreading: I don't look for modify Vuex state (I know commit mutation) , I just want to modify my currentLoadNode
variable. However, in a mystery way, Vuex also modify loadNode
state and throw me this error
[Vue warn]: Error in callback for watcher "function () { return this._data.$$state }": "Error: [vuex] do not mutate vuex store state outside mutation handlers."
Hope anyone enter this issue and could give me a help. Tks