skip to Main Content

Javascript – db request firebase with react

please can you help me to write this request in a new firebase notation please useEffect(() => { let unsubscribe; if(postId){ unsubscribe =db .collection("posts") .doc(postId) .colection("comments") .onSnapshot((snapshot)=>{ setcomments(snapshot.doc.map((doc)=>doc.data())) }) } }, []); best regards im trying to write it but…

VIEW QUESTION

Flutter firestore document counter display problem

I'm a bit inexperienced with Firebase data output I have a query in firestore for a data counter in a collection it looks like this (taken and slightly corrected from the official documentation) final fs = FirebaseFirestore.instance; fs.collection("users").count().get().then((users) => print('${users.count}'),…

VIEW QUESTION
Back To Top
Search