Why is my code not rendering the image that I am trying to render?
Any help is appreciated, I've been stuck with this problem for some time now.
Code:
export default class Homepage extends Component {
constructor(props) {
super(props)
this.state = {
images: [
"https://www.clker.com/cliparts/3/m/v/Y/E/V/small-red-apple-hi.png",
]
}
}
render() {
return (
<div>
<div className="gallery">
{this.state.images.map(({ src, index }) => (
<img key={index} src={src} width="250px" height="250 px" />
))}
</div>
</div>
)
}
}