Do you think it's sufficient to create vuex-actions as simple as a1, without chaining then/catch calls? Or should I always go with creating Promises as in a2 (and also adding a reject branch)?
Appreciate your insights...
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex);
const debug = process.env.NODE_ENV !== 'production';
export default new Vuex.Store({
state: { ... }
...
actions: {
a1: (state, response) => {
state.commit('setNavMenu',{signIn: true, signUp: true, signOut: false});
...
},
a2: (state, response) => {
return new Promise((resolve) => {
state.commit('setNavMenu',{signIn: true, signUp: true, signOut: false});
...
resolve();
});
},
...