Quantcast
Channel: Display image from URL stored in data from API - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Jenni Norell for Display image from URL stored in data from API

Figured it out!! instead of < img src={this.state.forecasts[0].icon} alt="Icon"/ > i needed to write < img src ={this.state.forecasts ? this.state.forecasts[5].icon : "none" }/>

View Article



Display image from URL stored in data from API

I am trying to add an image to a small weather app that I'm building. The image url is stored in the data of the API that I'm using but I'm can't figure out how to display this image. I've attempted...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images