Skip to content

Instantly share code, notes, and snippets.

@shanebdavis
Created November 25, 2019 18:23
Show Gist options
  • Save shanebdavis/2847e9ee4016d39ab9d202104d8d8f8d to your computer and use it in GitHub Desktop.
Save shanebdavis/2847e9ee4016d39ab9d202104d8d8f8d to your computer and use it in GitHub Desktop.
Todo App UX-concept (React)
const ToDoItem = ({ item }) =>
<li>
{item.text}
<button onClick={ deleteItem }/>
</li>
const ToDo = () =>
<div>
<ul>
{useList().map(item => (
<ToDoItem key={ item.id } item={ item } />
))}
</ul>
<input type="text"/>
<button onClick={ addItem }/>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment