A doubt in vuex

API of Vuex

mutations: Type: {[type: string]: Function}
actions: Type: {[type: string]: Function}
getters: Type: {[key: string]: Function}

Why does getters use key and the other two use type?

Mar.22,2021

1. getters you can understand that key
2. actions and mutations type are actually used to distinguish different action. Type here is actiontype


because they represent different things. Key in getter refers to key, in store of vuex, while type in action and mutation represent different methods under action and mutation, respectively. You can understand it as


of course of vuex. Please enter the code to specify

.
Menu