Last active
June 1, 2018 22:46
-
-
Save sbussard/1fb0d700ae9455804951274f935989c6 to your computer and use it in GitHub Desktop.
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
let itemData = [ | |
{ name: 'Chair', price: '$199', id: 'abc123' }, | |
{ name: 'Table', price: '$799', id: 'def456' } | |
]; | |
let ItemList = ({ items }) => ( | |
<ul> | |
{items.map(({ name, price, id }) => ( | |
<li key={id}>{`${name} - ${price}`}</li> | |
))} | |
</ul> | |
); | |
// ... <ItemList items={itemData} />; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment