Questions tagged [vuexfire]

38 questions
4
votes
0 answers

Data disappears after page is reloaded - vuexfire

Hi everybody i have the following problem: I use vuexfire. When i bind the data from firestore it appears and after reloading the page or visit another page and come back the data disappears. Does anybody know this issue and how to fix it? Here are…
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
3
votes
1 answer

Vuexfire bindFirebaseRef with pagination infinite scroll

Question: How can I add pagination (infinite scroll) to my binded Firestore VuexFire reference without re-querying previously retrieved (and binded) results? Background: I am currently using VuexFire firestore binding to fill a timeline for most…
JavaBeast
  • 766
  • 3
  • 11
  • 28
3
votes
2 answers

Vue watch array (or object) push same old and new values

I'm using Vuex and I've created a module called claims that looks like this: import to from 'await-to-js' import { functions } from '@/main' import Vue from 'vue' const GENERATE_TX_SUCCESS = 'GENERATE_TX_SUCCESS' const GENERATE_TX_ERROR =…
Jesús Fuentes
  • 919
  • 2
  • 11
  • 33
3
votes
2 answers

How to query with vuexfire

I managed my state with vuexfire. For now and testing I bind to each "table" / node in Firebase. As data starts to grow I need to query so I don't send so much data to the client. For example. I bind to the order "table" with db.ref('orders') but…
user2856066
  • 821
  • 1
  • 11
  • 20
2
votes
1 answer

Nuxt this.$route is undefined

I have a dynamic route called products/_id which should load an product from Firestore. I am using VueFire to fetch the product from the Firebase database. Fetching the whole products collection works perfectly fine. firestore: { product:…
2
votes
0 answers

How to handle mutations when using vuexfire with modules?

The following is written in regard of using mutations together with modules in the vuexfire documentation, together with some code snippets: Add the mutations to your root Store and make sure to define the property you want to bind in the state…
sunwarr10r
  • 4,420
  • 8
  • 54
  • 109
2
votes
2 answers

Why is vuexfire not updating state but updating the ui correctly?

I'm trying to set up vuexfire with firestore for a project, I think I've done everything according to the docs. I managed to get data from firestore inside a component using vuex/vuexfire and show it correctly in the UI but when inspecting the state…
yzoldan
  • 188
  • 2
  • 14
1
vote
1 answer

vuexfire firestore orderBy descending is not working, works in acending

This code works in default ascending but as soon as I feed desc in orderby, it returns empty. return bindFirestoreRef( 'codesBatch', codeCollection .orderBy('createdOn', 'desc') .limit(payload.limit || 3) …
1
vote
0 answers

Vue, Firebase, Vuexfire: How to keep track of the current user?

I am building an app with vue and vuex and connect it to Firebase like this: import firebase from 'firebase'; import "firebase/firestore"; firebase.initializeApp(firebaseConfig); export const auth = firebase.auth(); export const db =…
Julian
  • 591
  • 5
  • 14
1
vote
1 answer

How do I access rootGetters from a different namespaced module in Vuex?

I have a Vuex module named 'forms'. I have a different (also namespaced) module named 'users'. I'm using Vuexfire (for the first time, which I think is what's tripping me up). And have an action that works like this: const actions = { …
1
vote
0 answers

Vuexfire:How many reads does bindFirestoreRef trigger?

Since I observe an unexpectedly high number of reads I tried to figure out using the docu how many reads binding the same document several times triggers. Suppose I have an action: export const setTodosRef = firestoreAction( ({ bindFirestoreRef,…
Boern
  • 7,233
  • 5
  • 55
  • 86
1
vote
0 answers

Binding VuexFire to a collection filtered with a query

I'm unsuccessfully trying to bind a Vuex state attribute to a queried collection in FireStore. I was wondering if anyone with more experience could point me in the right direction. This is what I'm currently doing: In a Vuex Module called auth I'm…
Apophis
  • 433
  • 1
  • 6
  • 14
1
vote
0 answers

Sync firebase (vuexfire) without errors and warnings

I have a firestore binding in my vuex store, on which one frontend element depends. Here is some example code: Vue Template: Do…
sunwarr10r
  • 4,420
  • 8
  • 54
  • 109
1
vote
0 answers

Real time binding of collection not working when user first logs in (Vue.js, Vuexfire, Firebase)

I am developing a notification system and I came across Vuexfire to make the bindings between the notifications collection and the table in real-time. So far so good, the problem is: I can send notifications to users and groups ath the same time,…
1
2 3