Skip to content

Instantly share code, notes, and snippets.

@sbussard sbussard/dont.jsx
Last active Jun 1, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.