posva / vuexfire

Check
https://github.com/vuejs/vuefire
MIT License
558 stars 49 forks source link

Support of Firestore #208

Closed SumNeuron closed 5 years ago

SumNeuron commented 5 years ago

Following James2Doyle's example, if you change the accountsdatabase to a firestore in the file /store/index.js

const actions = {
  setAccountRef: firebaseAction(({ bindFirebaseRef }, path) => {
    return bindFirebaseRef('account', firebase.firestore().doc(path)) // firestore
    // return bindFirebaseRef('account', firebase.database().ref(path)) // <--- original
  }),
...
}

doesnt work, throwing: TypeError: "source.on is not a function"

using ref throws

"firebaseWEBPACK_IMPORTED_MODULE3default.a.firestore(...).ref is not a function"

please add support for firestore

posva commented 5 years ago

Answered in vuefire