Skip to content

Show image from Firebase with React Native #16

Description

I‘m trying to show my images from Firebase with React Native - but i can’t. 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. I want to see my picture in imageView. By the way I saved the image's names with user's ids.

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>
    );
}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions