This plug-in saves the state of your app in the local storage and simplifies the development of mutations.
Install through npm:
npm install --save vuex-mutations
Use it in your app like so:
import VuexMutations from 'vuex-mutations';
Vue.use(Vuex)
export default new Vuex.Store(
VuexMutations({
state: {
user: { asd: 1 },
some_data: 123
},
})
);
this.$store.commit('someData', 'new some data value');
this.$store.commit('user', { new: 'user' });