Skip to content

Instantly share code, notes, and snippets.

@JeromeFranco
Last active July 7, 2019 11:57
Show Gist options
  • Save JeromeFranco/ff35de73c546999c494683cf654b0d8f to your computer and use it in GitHub Desktop.
Save JeromeFranco/ff35de73c546999c494683cf654b0d8f to your computer and use it in GitHub Desktop.
const TodoList = ({ todos, onDelete, canDelete }) => {
return (
<div>
<Title value="Todo List" />
<div>
{todos.map(todo => (
<TodoItem
key={todo.id}
todo={todo}
onDelete={onDelete}
canDelete={canDelete}
/>
))}
</div>
</div>
);
};
TodoList.propTypes = {
todos: PropTypes.array,
onDelete: PropTypes.func,
canDelete: PropTypes.bool,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment