The documentation at https://vuex.vuejs.org/en/getting-started.html says,
You cannot directly mutate the store\'s state. The only way to change a sto
I am going to make this very simple:
Because the state object is already reactive, you can completely avoid using getters and mutations. All of Vue’s templates, computed, watch, etc. will continue to work the same as if using a component’s data. The store’s state acts as a shared data object.
But by doing so you will lose the ability to implement time-travel debugging, undo/redo, and setting breakpoints, because you will have circumvented the command design pattern and encapsulation of a member by using methods.
https://en.m.wikipedia.org/wiki/Command_pattern