Skip to content

Instantly share code, notes, and snippets.

@arthurvi
Created October 5, 2020 09:34
Show Gist options
  • Save arthurvi/8aaf8e4deb00e53e9b326f192cfaeeda to your computer and use it in GitHub Desktop.
Save arthurvi/8aaf8e4deb00e53e9b326f192cfaeeda to your computer and use it in GitHub Desktop.
ItemList.after.jsx
function ItemList() {
const [items, setItems] = React.useState(itemsFromServer);
return (
<ul>
{Object.values(items).map((item) => (
<ItemWrapper
key={item.id}
item={item}
setItems={setItems}
/>
))}
</ul>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment