nuxt-community / legacy-modules

MIT License
1.29k stars 157 forks source link

firebase module in store #120

Open joshua1 opened 7 years ago

joshua1 commented 7 years ago

Hi, I am trying to use the firebase module in my vuex store. per the plugin implementation , firebase is injected into store as a property here

    store.$firebase = Vue.prototype.$firebase
  }

How do i access this firebase instance in store , particularly the modules implementation of store. the this instance doesn't seem to contain a $firebase property

This question is available on Nuxt.js community (#c70)
pi0 commented 7 years ago

Hi @joshua1 .This is pending for vuex release for vuejs/vuex#872 and coming soon :)

joshua1 commented 7 years ago

@pi0 ok, seen. I hope this comes out soon, for now am just initializing in nuxtServerInit and accessing in an import, dont like the idea of passing in as an action parameter

kieusonlam commented 6 years ago

Is this work on vuex now? Cuz I don't know how to use it. I did try something like this.$firebase or this.firebase but no hope :(