Questions tagged [vuexfire]
38 questions
1
vote
2 answers
How to use Moment.js with Vuexfire
I am building a Vue.js application that uses Vuexfire in a store.js file. My application enables a user to push user-inputted posts with timestamps into Firestore. I am configuring my Vuexfire action handler to commit to mutation the firebase…

JS_is_awesome18
- 1,587
- 7
- 23
- 67
1
vote
0 answers
Does vuexfire have a problem with reactivity?
I thought there was a bug in vue dev tools, but now I'm wondering if vuexfire has a bug with reactivity?
Clearly the mutations are firing ...
However, the state is always at 0 length at vue dev tools.
BUT, console.log shows that it did pull down…

chi11ax
- 541
- 1
- 6
- 17
1
vote
0 answers
Vuexfire / Firestore rules : role-based access to select elements of a collection
I am having trouble implementing a role-based access system using Firestore rules and Vuexfire.
My goal is to be able to bind a list in my app to a Firestore collection, with only part of its elements visible / editable, based on user roles.
When…

Naltec
- 11
- 2
1
vote
1 answer
How do I get firestore collection reference from within then() function?
I am using vuexfire to bind firebase references to my app state.
This works fine:
bindRef: firebaseAction(({bindFirebaseRef}, payload) => {
let firebaseRef = db.collection(`/${payload}`)
bindFirebaseRef('storeProperty',firebaseRef)
})
I,…

Stephen Kastona
- 13
- 5
0
votes
1 answer
I use typed-vuex ,work without nuxt, I can not solve this error
I can not solve this error.
"typed-vuex": "^0.2.0",
"@vue/eslint-config-typescript": "7.0.0",
"typescript": "~4.1.5",
import Vuex from 'vuex'
import Vue from 'vue'
import { actionTree, getterTree, mutationTree } from 'typed-vuex'
import {…

Rocko
- 1
0
votes
1 answer
Firestore, vue, vuex, vuexfire: How to make getter actually get data from store?
If I want to query documents from a Firestore with Vuexfire. I can successfully do this by doing the following:
I can bind the docs using this action:
bindEntries: firestoreAction(({ bindFirestoreRef }) => {
var query = db
…

Julian
- 591
- 5
- 14
0
votes
1 answer
vuexfire not working with Firebase Emulators
I'm using vuexfire to connect my vue/vuex app to Firebase Cloud Firestore. It works fine when actually connected to Firebase. It doesn't work when using the Firebase emulators.
Is there a specific way that the Firebase emulator needs to be connected…
0
votes
1 answer
VuexFire Synchronization with bind not working
I'm currently using VuexFire to bind the Cloud Firestore to my Vuex State. I'm having some issues getting it to work, any help would be appreciated.
What I'm currently doing is the following:
Vue.js File:
methods:{
...mapActions("comments",…

Apophis
- 433
- 1
- 6
- 14
0
votes
1 answer
how to get data from firestore database using vuexfire?
I am writing a chat app with the following data model:
using the following approach:
store/index.js
actions: {
bindMessages: firestoreAction(({ state, bindFirestoreRef }) => {
// return the promise returned by `bindFirestoreRef`
return…

sanchit verma
- 23
- 6
0
votes
1 answer
Vuexfire {serialize} option not formatting array properly
I am trying to add all Firestore document Ids when I query a collection. I can query all collections in an instance, but cannot tie their document Ids to the collection arrays.
This is the code I have that works to query all a user's products within…

Joe Elia
- 53
- 7
0
votes
1 answer
Dynamically bind a list of firebase collections with vuexfire
I have a list of firebase documents in a vuex store, and that list gets dynamically updated. I would like to bind the documents in that list dynamically with vuexfire.
state: {
docsToBind: [], // dynamic: this gets updated so I cannot hardcode a…

Malo Marrec
- 599
- 1
- 6
- 20
0
votes
1 answer
Mutation not updating data in Vuex
So one of my mutations takes the data from a an array from the state and adds it to an object.
The data is coming from firebase but the sortItems is not working.
The store.js file:
import Vue from "vue";
import Vuex from "vuex";
import {…

Saaransh Menon
- 387
- 3
- 11
0
votes
1 answer
How should I avoid duplicate data and API calls in a flat vuex structure?
I am currently building a vue/vuex/firestore/vuexFire project and I ran into the following issue.
Say I want to display a list of messages where each message is associated with a user. A user can submit multiple messages, which will all be under…

Sevy
- 25
- 5
0
votes
1 answer
Perform daily calculations on Vuejs app with firebase
I have a Vuejs app with firebase auth, firestore and vuex.
I have a daily calculation in one of the components.
What would be the best way to keep that calculated value valid, even if a user did not login for some time?
Thanks!
0
votes
1 answer
Paginating firestore data when using vuex and appending new data to the state
I implemented the following to display a paginated query (this was suggested by Tony O'Hagan in this post: How to get the last document from a VueFire query):
bindUsers: firestoreAction(({ bindFirestoreRef }) => {
return bindFirestoreRef('users',…

ak22
- 158
- 2
- 14