Skip to content

Commit

Permalink
6.1 To Do List part Two
Browse files Browse the repository at this point in the history
  • Loading branch information
serranoarevalo committed Oct 8, 2021
1 parent a167d61 commit 1b13332
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ function App() {
setToDos((currentArray) => [toDo, ...currentArray]);
setToDo("");
};
console.log(toDos);
console.log(toDos.map((item, index) => <li key={index}>{item}</li>));
return (
<div>
<h1>My To Dos ({toDos.length})</h1>
Expand All @@ -24,6 +26,12 @@ function App() {
/>
<button>Add To Do</button>
</form>
<hr />
<ul>
{toDos.map((item, index) => (
<li key={index}>{item}</li>
))}
</ul>
</div>
);
}
Expand Down

0 comments on commit 1b13332

Please sign in to comment.