firebase/snippets-web

Incorrect syntax, Not working properly. wrong way to console

aqibnawazdev opened this issue · 1 comments

It should be as

 console.log(doc.id,  "=>",  doc.data())

import { collection, getDocs } from "firebase/firestore";
const querySnapshot = await getDocs(collection(db, "users"));
querySnapshot.forEach((doc) => {
console.log(`${doc.id} => ${doc.data()}`);
});

try to use

const functions = require("firebase-functions");
functions.logger.error(error);