Making a large scale app with vue.js (part 1): modularize your store!
Stephane Souron
1.2K14

I don’t really agree with the point about not using mapState (and etc.). You can always create types and make it easier to read, because of using type consts instead of pure strings. Anyway, it’s a good thing to usecreateNamespacedHelpers vuex function. In such case you don’t have to chain ‘user’ module whenever you create store reference(to getter, action or mutation). You will just write:

import { createNamespacedHelpers } from 'vuex'

const { mapMutations, mapActions } = createNamespacedHelpers('user')

and then just use mapMutations or mapActions