Skip to content

Instantly share code, notes, and snippets.

@greaveselliott
Created June 23, 2019 01:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greaveselliott/a6956e33d40edc407310e8827ac5df04 to your computer and use it in GitHub Desktop.
Save greaveselliott/a6956e33d40edc407310e8827ac5df04 to your computer and use it in GitHub Desktop.
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