Questions tagged [vuefire]

Firebase bindings for Vue.js

VueFire is a binding library for Vue.js that reactively renders Firebase data in your app with minimal code.

168 questions
12
votes
3 answers

VueJS and Firebase, history mode 404 error when refresh

I removed the hashbang in the link with history mode in my router file. Now when I refresh a page I got the 404 error. I tried to follow this link then, I added the part in firebase.json : { "hosting": { "public": "dist", "rewrites": [ …
eQuinox
  • 201
  • 3
  • 8
5
votes
1 answer

Firestore references create a "TypeError: Converting circular structure to JSON"

I'm using Firebase's Firestore inside a Vue JS app: "firebase": "^5.8.0", "vue-firestore": "^0.3.16", When I try fetching a document which has a field referencing another document (reference type in Firestore), I get the following error: [Vue…
5
votes
2 answers

Vue.js: How to map a list of keys to Firebase objects?

I develop a small web-app based on Vue.js using Firebase to store and sync the data. I store items (e.g. with attributes title and subtitle) and lists with an attribute listitems, where an array of keys (those generated from Firebase) of items is…
andreas
  • 16,357
  • 12
  • 72
  • 76
4
votes
2 answers

Vuejs 3 createApp using firestorePlugin from vuefire getting Uncaught TypeError: Cannot set property '$unbind' of undefined and no render

in my vuejs3 app I'm having this simple code in my main.js import { createApp } from "vue"; import App from "./App.vue"; import { firestorePlugin } from "vuefire"; const app = createApp(App); app.use(firestorePlugin); app.mount("#app"); maybe…
Afaq Ahmed Khan
  • 2,164
  • 2
  • 29
  • 39
4
votes
2 answers

Vuexfire bind Firestore collection to Object instead of a List

I have the following collection in my Firestore database: Which I can bind to my vuex store with the following: state: { assets: [], }, actions: { bindAssets: firestoreAction(({ bindFirestoreRef }) => { return bindFirestoreRef('assets',…
Aaron N. Brock
  • 4,276
  • 2
  • 25
  • 43
4
votes
2 answers

export 'default' (imported as 'VueFire') was not found in 'vuefire'

Every single tutorial for how to use Firebase with Vue says that in the main.js file I have to add Vue.use(VueFire); which makes sense. But then I just get this message export 'default' (imported as 'VueFire') was not found in 'vuefire'. I tried…
A.lex
  • 81
  • 2
  • 5
4
votes
2 answers

Cannot read property 'ref' of undefined

I'm building a simple web app with Vue + Firebase + Vuefire and I get "Uncaught TypeError: Cannot read property 'ref' of undefined" when I try to use my Firebase db variable inside a component. In main.js Vue.use(VueFire) const firebaseApp =…
Fabrunet
  • 69
  • 1
  • 1
  • 7
3
votes
1 answer

How to store individual CSS styling in a database?

Thank you for helping people and contributing to the open source. I have a Vue.js to-do app. Data is stored in firebase via vue-fire and firestore. I have a function which checks the todo item done by clicking it. But this styling disappears…
sunflower seed
  • 263
  • 6
  • 19
3
votes
1 answer

Getting documents with ID from firstore collection

While using Firestore, vuefire, vue-tables-2, I stuck getting document's id. My data structure is as below. Here is my code. import {…
sungyong
  • 2,267
  • 8
  • 38
  • 66
3
votes
1 answer

Vuefire firestore() function not running to bind my data

I'm running into this issue that I can't figure out. I got VueFire to work on another app I had written, but for some reason it's just not binding in my current one. Below is the code on the page that calls the firestore() function, as well as the…
3
votes
2 answers

How can I make vuefire show loading screen?

As title Vuefire can auto get data from firebase database, but it needs some loading time. So I want to display some css animation before data being fetched, is there any event can I $watch when it successed
3142 maple
  • 865
  • 2
  • 11
  • 27
3
votes
2 answers

VueJs + Firebase

I'm starting to use VueJS with Firebase (and VueFire), but I'm starting to struggle a bit about how to structure the data. My case is pretty simple. I have a list of suppliers and a list of products. A product can only be linked to one supplier, and…
Jerome
  • 219
  • 1
  • 2
  • 10
2
votes
1 answer

Nuxt 3 Firebase and VueFire: useCurrentUser not working

I'm trying to use VueFire's useCurrentUser() function in a Nuxt 3 application without SSR. I have configured vuefire in nuxt.config.ts as indicated in the documentation. export default defineNuxtConfig({ modules: ['nuxt-vuefire',], vuefire: { …
2
votes
2 answers

Struggling to get the data from useDocument to display with vue.js and Firestore

I'm trying to get a single record from Firestore to display in Vue.js. I'm using VueFire and the guide here.