Closed rtibbles closed 5 years ago
One thing we can start doing now that won't break anything is move functions in options.vuex.getters
to options.computed
and options.vuex.actions
to options.methods
, like in this diff
Do we want to have mapGetters as a universal helper function that we can then swap out for the vuex mapGetters function?
Yeah, that's why I named them so similarly. It wouldn't be an exact swap though.
pre vuex3
...mapGetters({
isAdmin,
isCoach,
classCoaches,
isSuperuser,
className,
}),
vuex 3 (assuming these getters are defined on your store/module
...mapGetters([
'isAdmin',
'isCoach',
'classCoaches',
'isSuperuser',
'className',
]),
@jonboiser please close this issue once your final introduction of modules for page state has been merged
Summary
Vuex3 will allow better and more modular Vuex state management.