All Questions
Tagged with react-native google-cloud-firestore
1,293
questions
106votes
12answers
167kviews
Getting all documents from one collection in Firestore
Hi I'm starting with javascript and react-native and I'm trying to figure out this problem for hours now. Can someone explain me how to get all the documents from firestore collection ?
I have been ...
42votes
7answers
13kviews
Is there a workaround for the Firebase Query "IN" Limit to 10?
I have a query for firebase that has an array of IDs that has a size > 10. Firebase has restrictions on the number of records to query in one session. Is there a way to query against more than 10 at a ...
22votes
5answers
8kviews
firebase firestore addding new document inside a transaction - transaction.add is not a function
I was assuming that it was possible to do something like:
transaction.add(collectionRef,{
uid: userId,
name: name,
fsTimestamp: firebase.firestore.Timestamp.now(),
});
But apparently it is not:...
18votes
5answers
17kviews
Is possible to call async function without await keyword? and what happens if we call without await?
I would like to do the following and keep in mind it actually works for me. my question is what happens and Is possible to call async usrs() func from non async componentDidMount() func?
if it is not ...
15votes
3answers
5kviews
What's the difference between Firebase JavaScript SDK and react-native-firebase
I am trying to use to use Firebase (Cloud Firestore) for a react-native app, to store my JSON objects.
I ve seen people using Firebase in their apps (npm install firebase), and others using react-...
13votes
3answers
4kviews
Can't get data from React-Native-Firebase(v6) Firestore: undefined is not a function (near '...this._firestore.native.collectionGet...')
I've been stuck on this issue for so long. I just started implementing Firestore in my react-native application with react-native-firebase. I'm just following the docs [https://invertase.io/oss/react-...
12votes
2answers
10kviews
What is the best practice of firestore data structure?
I'm making a blog app using firebase.
I want to know the best practice of data structure.
As far as I know, there are 2 case.
(I'm using react native)
case 1:
posts
-postID
-title,content,...
12votes
7answers
2kviews
In react native app (through Expo) using firestore permissions - request.auth is always null
Here's my code:
firebase.auth().onAuthStateChanged((user) => {
if (user) {
console.log("We are authenticated now!");
firebase.firestore().collection("users")
.doc(...
11votes
2answers
13kviews
How do I link auth users to collection in Firestore?
I'm trying to connect a user to the user collection in firestore. I'm using cloud functions, but I don't think I'm implementing it correctly.
firebase.auth().createUserWithEmailAndPassword(email, ...
10votes
2answers
27kviews
How to get sub-collections with Firebase firestore? [duplicate]
I am tying to get all the collections withing the withing the document, I don't know how to do it I am new to firestore.
Firebase.firestore()
.collection("reservations")
.doc(tripUid)
...
9votes
2answers
19kviews
Getting 'firestore/permission-denied' while integrating firestore in React native mobile app
I'm trying to firestore documents through react native app, but facing the following issue
Here is the code
constructor() {
super();
this.ref = firebase.firestore().collection('todos');
}...
9votes
1answer
4kviews
Firebase Firestore missing or insufficient permissions using Expo (React Native)
I've been using FireStore for a project that works fine in the browser, but when I port the code to Expo, running on a iOS 11.2 iPhone X in the simulator, it keeps raising Error: Missing or ...
9votes
1answer
5kviews
Arrays vs. Maps vs. Subcollections for a set of Objects on Cloud Firestore
I am developing a mobile app in React-Native. Data is stored on Cloud Firestore. I have a question regarding the best way of structuring the data on Cloud Firestore.
The list of contacts, which ...
9votes
1answer
3kviews
Enabling Firestore Persistence for React Native
I am using React Native Firebase and I am trying to enable persistence for my app.
On my Android onCreate:
public void onCreate() {
super.onCreate();
FirebaseDatabase.getInstance()....
7votes
4answers
8kviews
firestore Error: Argument "documentPath" must point to a document
I build react native app with firebase/firestore and I get the error
Error: Argument "documentPath" must point to a document.
when I write this line
var userStatusFirestoreRef = firebase....