I must be doing something wrong. I'm working on a codepen that makes a call to a REST endpoint for beer information, then I loop over it and display some of the info. Nothing fancy and it's not complete yet in terms of nice looking CSS etc. but the looping over my array of beers doesn't work:
https://codepen.io/larryq/pen/yKyMOz
The key section is this bit below. I get my data back from the endpoint and add it to a 'beersList' array that's in my state. Then in the JSX I loop over it:
this.state.beerList.map(beer => {
<div>
<div className="beer-img">
<img src={beer.img} height="350" />
</div>
<div className="beer-info">
<h2>{beer.name}</h2>
</div>
</div>
})
..the trouble is, nothing appears on the screen, none of the <div>s are generated.
I know for a fact when debugging that beerList is populated with the data I'm after, and in the console I can map over it and print out the information. But on the screen here nothing happens and I can't figure out why?