skip to Main Content

Javascript – FCM message being receive from Firebase messaging but not from the cloud function

I am using a cloud functions to send a fcm message to the admins phone every time the bookings collection has a new document here: const functions = require("firebase-functions"); const admin = require("firebase-admin"); admin.initializeApp(); exports.sendBookingNotification = functions.firestore .document("bookings/{bookingId}") .onCreate(async (snapshot,…

VIEW QUESTION

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
Back To Top
Search