Created
December 1, 2017 16:02
-
-
Save sfrdmn/44d06669a3d2e521007016e93120826d to your computer and use it in GitHub Desktop.
mcr_post_12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const FoodList = ({ loaded, data }) => { | |
if (!loaded) { | |
return <Spinner /> | |
} | |
const { foodItemsWithFacts } = data; | |
return ( | |
<ul className="food-list"> | |
{ | |
foodItemsWithFacts.map(({ name, quantity fact}) => ( | |
<li> | |
<p>{name} quantity: {quantity}</p> | |
<p>{fact}</p> | |
</li> | |
)) | |
} | |
</ul> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment