re: Quick guide to Vuex VIEW POST

VIEW FULL DISCUSSION
 

Thanks. I'm using Vuex in my all projects even if they so basic.

But there is a thing I don't like it. Mutations and actions are the same. If you're using actions, mutations' behavior is like a mediator.

For example;

mutations: {
   FILL_SPELLS(state, spells) {
      state.spells = spells
   }
},
actions: {
   fillSpells(ctx, spells) {
      ctx.commit('FILL_SPELLS', spells)
   }
}

I don't like this. But, Vuex's usage is easier than other equivalents.

code of conduct - report abuse