Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get data firebase

        const collectionRef = collection(db, "DATA-COLLECTION");
        const docSnap = (async () => await getDocs(collectionRef))();

        useEffect(() => {
                docSnap.then((data) => {
                        data.forEach((doc) => {
                                console.log('doc: ', doc);
                                console.log(doc.data());
                        });
                });
 
PREVIOUS NEXT
Tagged: #data #firebase
ADD COMMENT
Topic
Name
1+3 =