Created
June 23, 2019 01:00
-
-
Save greaveselliott/a6956e33d40edc407310e8827ac5df04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return ( | |
<main className="app"> | |
<h1 className="app__title">To do list</h1> | |
<form className="app__form"> | |
<input type="text" className="app__input"/> | |
<input | |
type="submit" | |
className="app__input-submit" | |
value="Add to list" | |
/> | |
</form> | |
<ul className="app__list"> | |
{state.list.map((listItem, index) => ( | |
<li className="app__list-item" key={`list-item-${index}`}> | |
{listItem.listItemValue} | |
<button className="app__list-item-delete"> | |
Delete | |
</button> | |
</li> | |
))} | |
</ul> | |
</main> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment