commit in components
api.subscribe({ eventName: this.eventName, email: this.email }).then(res => {
this.$store.commit("EMAIL", this.email)
})
the data is received in store, and the output data of the console is normal
//state
const state = {
userId: "",
email: ""
}
//mutations
[types.EMAIL](state, email) {
console.log(email)
state.email = email
}
but in vue devtools email is still undefined
if you commit, in the action of store, everything is fine