I am currently exploring the functionality of vuex-module-decorators found at . Suppose my module's state includes a property called dir
which is a dictionary structure: {[key: string]: string}
. Can I utilize @MutationAction
to update an element within that dictionary? The code example below may not be correct, but it attempts to convey my intentions.
export default class Module extends VuexModule {
dir: {[key: string]: string}
@MutationAction(???)
updateDir(keyValue) {
return keyValue // ???
}
}
Is there any documentation available on how to properly use @MutationAction
, including what arguments it accepts and what actual mutation it triggers?