Skip to content
Advertisement

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 error: Uncaught TypeError: Cannot read properties of null (reading ‘name’)

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 collection, each doc is named the ID of the

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. Once a user logs in, we start a Web Worker to initialise app

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

Advertisement