Skip to content

Instantly share code, notes, and snippets.

@tlrobinson
Last active December 5, 2015 00:47
Show Gist options
  • Select an option

  • Save tlrobinson/5a7210619a760d68c96f to your computer and use it in GitHub Desktop.

Select an option

Save tlrobinson/5a7210619a760d68c96f to your computer and use it in GitHub Desktop.
const App = ({ items }) =>
<List items={items} />
const List = ({ items }) =>
<ul>
{items.map(item =>
<Item key={item.id} item={item} />
)}
</ul>
const Item = ({ name }) =>
<li>
{name}
</li>
const App = ({ items }) =>
<List>
{items.map(item =>
<Item key={item.id} item={item} />
)}
</List>
const List = ({ children }) =>
<ul>{children}</ul>
const Item = ({ name }) =>
<li>
{name}
</li>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment