Can you explain the rationale behind Vuex having both "actions" and "mutations?"
I can see the point of components not directly modifying state, but it seems redundant to have actions trigger mutations to update the state.
What sets "actions" apart from "mutations," how do they cooperate, and why did the creators of Vuex choose this design?
I've experimented with....
import Vuex from 'vuex'
const store = new Vuex.Store({
state: {
count: 1
},
mutations: {
INCREMENT (state) {
// mutate state
state.count++
}
}
})
Error code 502