I am trying to display my image from Firebase storage in my React-native app. I get the download URL through this async function:
async function getImage() {
const url = await storage()
.ref('garnele.jpg')
.getDownloadURL()
console.log(url)
return url
}
My problem is how to pass the URL to the Image component. I tried:
<Image
source={{uri: getImage() }}
/>
but it only returns the object.
I also found getImage().then(result => console.log(result)) - but I don't know how to use it in my case.