我想比较firestore中的项目ID和props中的ID,并从此集合中获取所有数据。
我有这个结构
export const getProjData = data => async(dispatch,getState,{firebase,firestore}) => {
const { uid: userId } = getState().firebase.auth;
try{
const res = await firestore.collection("Projects").doc(userId).where("id","==",data).get()
console.log(res)
} catch(err) {
}
}
但是我没有定义