vuex-easy-firestore icon indicating copy to clipboard operation
vuex-easy-firestore copied to clipboard

Prefixing v-e-f actions

Open dsl101 opened this issue 4 years ago • 1 comments

I have an app that I'm slowly porting over to use v-e-f and firestore, and have just been stuck for an hour trying to work out why my clearUser action wasn't being executed. I eventually found the answer here :) I couldn't see any reference to this in the documentation via the search at the top of the page, nor did there seem to be a full API list of all actions / mutations.

In any case, it would be great if there was a prefix for all the v-e-f actions so that I could keep my app using clearUser. Perhaps this could be done at initialisation like this:

const easyFirestore = VuexEasyFirestore(
  [myModule],
  {
    prefix: 'vef_',          // ← Allow all actions / mutations to be prefixed
    logging: true,
    FirebaseDependency: Firebase
  }
)

and then dispatch actions with dispatch('vef_openDBChannel') and so on.

dsl101 avatar May 06 '20 16:05 dsl101

I did the easy bit, and put some warning code in here #328

dsl101 avatar May 06 '20 17:05 dsl101