Created
December 1, 2017 15:56
-
-
Save sfrdmn/67faeb23222bd04fce7c4abbbc592d2f to your computer and use it in GitHub Desktop.
mcr_post_03
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 App = ({ foodItems, addFoodItem }) => ( | |
<div> | |
<ul> | |
{ | |
foodItems.map(({ name, quantity }) => ( | |
<li>{name}, quantity: {quantity}</li> | |
)) | |
} | |
</ul> | |
<button onClick={() => addFoodItem({ name: '🍋', quantity: 50 })}> | |
Add Food Item | |
</button> | |
</div> | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment