I am using react-native to develop my application.
Now I want to get the document id for a document (id generated by the firestore) from one of my collections by querying it using one of the "unique" data stored in that document (like id, username, phone number, email etc.). What would be the fastest way to get this document id?
Is there a way which is faster than running a query like:
documentRef = db.collection('MYDOCS').where("tel","==","12345678").limit(1);
documentRef.get().then((querySnapshot)=>{
documentID = querySnapshot.docs[0].id;
})
Thanks!