useEffect(() => {
const q = query(collection(db, "posts"));
const querySnapshot = getDocs(q);
querySnapshot.forEach((doc) => {
console.log(doc.id, " => ", doc.data());
});
}, []);
I'm trying to access all documents from my firestore collection. but it throws an error FirebaseError: Expected type 'mc', but it was: a custom ln object