No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Quasar and vuefire

    Framework
    5
    5
    567
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      meesterKurt last edited by meesterKurt

      I would like to use firebase and vuefire in my project.
      But for some reason, i can’t find a way to do the setup right.
      I made a bootfile like this

      import firebase from 'firebase/app'
      import 'firebase/firestore'
      import 'firebase/auth'
      
      import Vue from 'vue'
      import {
        firestorePlugin
      } from 'vuefire'
      
      Vue.use(firestorePlugin)
      var firebaseConfig = {
        ....
      };
      // Initialize Firebase
      let firebaseApp = firebase.initializeApp(firebaseConfig);
      let firebaseAuth = firebaseApp.auth()
      const db = firebaseApp.firestore()
      
      export {
        firebaseAuth,
        db
      }
      
      

      In the index.vue i’ve put, just for test purpose

      <template>
        <q-page>
          <h1>Testpage</h1>
         
          <div>
          <q-btn @click="loggen">Log all data</q-btn>
          </div>
        </q-page>
      </template>
      
      <script>
      import { db } from "boot/firebase";
      
      export default {
        name: "PageIndex",
        methods: {
          loggen() {
            console.log("fblog", this.test);
          }
        },
        firestore: {
          test: db.collection("TestCollectie")
        }
      };
      </script>
      

      But this gives me an error like
      boot_firebase__WEBPACK_IMPORTED_MODULE_0__.db.collection is not a function

      Is there someone who can point me in the right direction? What am i doing wrong?
      Or does anyone has a demo-repo with quasar and vuefire where i can find an answer?

      Any help is appreciated!

      1 Reply Last reply Reply Quote 1
      • J
        jrhopkins83 last edited by

        Hi, I’m using Vuexfire successfully in my project as I’m using it to maintain a Vuex state rather than on an individual component.

        Let me know if you’d like to see that set up.

        R 1 Reply Last reply Reply Quote 0
        • R
          Reto @jrhopkins83 last edited by

          @jrhopkins83
          Hi i’m interested in your setup for vuexfire.
          Could you show it?

          1 Reply Last reply Reply Quote 0
          • P
            pd76 last edited by

            me too, thanks.

            dobbel 1 Reply Last reply Reply Quote 0
            • dobbel
              dobbel @pd76 last edited by

              @pd76

              Here’s an article about Quasar Firebase and Vuexfire:
              https://dev.to/quasar/to-the-stars-with-quasar-firebase-user-profile-319l

              Here’s the repo of a demo app( from the article):
              https://github.com/quasarframework/firebase-sample-apps/tree/master/data/profile

              1 Reply Last reply Reply Quote 1
              • First post
                Last post