i searched for many solutions but its all say somthing like this. so if any one can help me then it will be very good form me. Answer I think you’re mixing and matching SDK versions, or at least syntax. Try using the increment top-level function from the regular v9 SDK (not its compat library).
Tag: google-cloud-firestore
Firebase Firestore returns [object Object] instead of instead of a plain object
I have a custom hook called useDocument.js below which fetches the data from a firestore collection via a specific ID. Why is it that it’s returning [object Object] instead of plain object. I’ve tried accessing the name property and logging it to the console using document.name but throws up an er…
TypeError: can’t access property “indexOf”, n is undefined
I want to get a doc from firebase on page render, which I do get first(following a button), but after I refresh the page I get this error: My code is: when it works fine I go to the page clicking this div: but now if I refresh, i get the above error. Rest of the code here: fbconfig.js: I
Unable to batch.delete documents of a subcollection
I have a collection called display and each document inside the display has a subcollection called history. There’s no error, though, it does not delete the documents in Firestore. After selecting the row to be deleted, it is gone when you click delete. However, once you reload the screen, the data dele…
getDoc values Firebase React
This should honestly be the simplest thing. I’ve got a UserPage in my React project. The job is simple, to see and edit values in firebase. Ive got the edit portion working but the read isn’t returning any values. as you can see I’ve got a collection called “users”. Within the co…
Firebase: authenticated and guest clients connecting to same Firestore Database
My use case is, I have a web app in which I listen to Firestore collections. One of the collections are for public users where anonymous auth is enough. And the second collection is for logged in users, so I implemented custom token auth following this. https://firebase.google.com/docs/auth/web/custom-auth. O…
Firestore Pagination, how to?
I can’t really seem to wrap my head around how this is done. Don’t think the documentation is explaining it very well, or maybe I’m just not getting it 🙂 What I’m trying to do is have a list that start out by showing X items. Then with a click of a button load the next X items in the…
The best way to query by location in firestore
I am using Firebase 8.10.0 with Vue js 2.6.14 I am trying to query in Firestore about the documents that are less than 3 km away from my location And discovered that I could not do this query in firestore, I was frankly disappointed Then after watching a video by Frank van Puffelen on YouTube “Querying …
How do I add files from form to Firebase database? Vue js + Vuetify + Firebase
This is my first time using both Vuetify and Firebase. Following a tutorial, I was trying to add some data to my db in firebase (not images). After installing firebase in my project with npm, I’ve set it up in a separate js file like this: In the vue.js file where I have the form for the new object with
Firestore GET all Boolean TRUE then append FALSE values
I need a request/ request flow that retrieves all the documents where the boolean is true and then gets all that is false. Is there a firestore query I can make that does this? An orderBy? Currently, I have an InfiniteScroll and I am struggling for the display to switch between getting true values to getting …