My child component receives a Promise which is fullfilled, now I want to access the values of it like this :
return (
<>
<h1>{profile.Email}</h1>
</>
)
The resolve looks like this in the console console.log(profile)
Promise {<fulfilled>: {…}
[Prototype]]: Promise
[[PromiseState]]: "fulfilled"
[[PromiseResult]]: Object
Email: "XXXXn@gmail.com"
Firma: "Dr"
Hausnummer: "1"
Land: "Deutschland"
LogoId: "Bildschirmfoto 2022-05-16 um 15.26.25.png"
Nachname: "BXXXX"
PLZ: "31840"
Stadt: "Hameln"
Strasse: "Gutsstr"
Telefon: "2121212121"
Titel: "Dr"
Typ: "XXXXX"
Vorname: "XXXX"
__typename: "Profil"
I want to access each of these values in the return(). How do I do that? I can access them before with
profile.then((values) => {
email = values.Email
console.log(email)
})
which gives the correct value in the console, but I need the value in the return. Any one can point me in the right direction?