[Vuejs]-How to have global store to share with other store in Nuxt

0👍

If you want to have a more generic namespaced module, you can use global Vuex actions: https://vuex.vuejs.org/api/#dispatch

This paired with rootState https://vuex.vuejs.org/api/#mutations

Would be enough to make something generic. I’ve achieved it this way with some dynamic interpolation and conditional. Beware of not making it too complex tho, 100% DRY is not always the best. Sometimes some repetition can be totally fine!

Leave a comment