I'm looking for a way in initialize a useState object with the value that is fetched from firestore
getDoc(docRef).then((doc) => {
const initEmail = doc.data().email
console.log(initEmail)
return initEmail
})
const [email, setEmail] = useState(initEmail)
how would i go about doing this?