Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I bet it's something very trivial, but even the docs arent clear about this. I don't have to mention that writing anything about firebase in google search returns topics that are related not with JS/WEB but with android in most cases...

The case is that I have a storage folder images that holds... images. I would like to retrieve it when entering my site. My try:

componentDidMount() {
  const images = firebase.storage().ref().child('companyImages');
  const image = images.child('image1');        <----------------    // file name is image1
  image.on('value', (snap) => this.setState({ img: snap.val() }));
}

However it doesnt work as I suppose it to do. As u can see I would like to store this image in state and then display in some part of my site.

Looking forward for any hints etc. Thank u :)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
128 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...