I want to see the link to my image in the imageUrl variable.
When I log sampleImage, I see JSON-like data and I can see a link in this data's i section.
But when I log imageUrl, it returns undefined.
render() {
const uid = '12345';
const imageRef = firebase.storage().ref(uid).child(uid);
const sampleImage = imageRef.getDownloadURL().then();
const imageUrl = sampleImage.i;
console.log(sampleImage);
console.log(imageUrl);
return (
<View>
<Image style={{ width: 55, height: 55 }} source={{ uri: null }} />
</View>
);
}
}