Skip to content

Instantly share code, notes, and snippets.

@jogilvyt
Last active January 25, 2021 15:16
Show Gist options
  • Save jogilvyt/49358fed0c2f41b4d59fb106b2d1d281 to your computer and use it in GitHub Desktop.
Save jogilvyt/49358fed0c2f41b4d59fb106b2d1d281 to your computer and use it in GitHub Desktop.
import ToDoItem from "../ToDoItem";
const ToDoList = ({ todos, handleDelete }) => {
return (
<ul className="list">
{todos.length ? (
todos.map(item => (
<ToDoItem item={item} handleDelete={handleDelete} key={item.id} />
))
) : (
<p>There is nothing left to do!</p>
)}
</ul>
);
};
export default ToDoList;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment