📌  相关文章
📜  从 firebase firestore 获取数据 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:19.283000             🧑  作者: Mango

代码示例3
//retrieve one document and save it to userDetails
const [userDetails, setUserDetails] = useState('')
db.collection('users').doc(id).get()
        .then(snapshot => setUserDetails(snapshot.data()))