Initializing firebase app before store is loaded #9167
Replies: 1 comment
-
Here's a Quasar firebase example app. The app (indirectly) calls Firebase functions from vuex actions (using a service.js). https://github.com/quasarframework/firebase-sample-apps and the accompanying article: https://dev.to/quasar/to-the-stars-with-quasar-firebase-initial-service-structure-1fcf And I found this less complicated example ( with firebase boot file and vuex importing the boot file and calling Firebase functions directly:
What do you mean with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am currently writing a quasar spa that uses the firebase autentication and the realtime database. Both features are excluslively used in a vuex store.
Because the app needs to be initialized before I can send API calls, I wrote a boot script but as it is stated in the quasar dacumentation the store is imported before the boot scripts:
[...]
Right now I initialize the app in the first store module that is imported, but that seems like a very bad workaround.
Is there another way to initialize the app before the store is imported or is it just bad design to use firebase in the store?
Thank you for suggestions!
Beta Was this translation helpful? Give feedback.
All reactions