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 ArticleDisplay 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
More Pages to Explore .....