使用下面的代码我得到了以下错误:querySnapshot.forEach is not a function。我还尝试使用documentSnapshot函数,但也不起作用。constructor(props) { var rootref = firebase.firestore().collection("deneme").doc("2"); rootref.get()
.
我正在尝试对数据库进行查询,以获取子集"roles“的所有文档,以重定向到不同的路由。currentUser.uid).collection('roles')let rol = ''
userRef1.get().then(function(querySnapshotquerySnapshot.forEach