Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created November 2, 2017 21:07
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 matthieu-D/62940f5f906c8ffeae2963ce5527f272 to your computer and use it in GitHub Desktop.
Save matthieu-D/62940f5f906c8ffeae2963ce5527f272 to your computer and use it in GitHub Desktop.
render() {
return(
<div>
<input onChange={e => this.addNewTodo(e.target)} />
<ul>
{this.todos
? <div>
{this.todos.map((todo) => {
return <my-todo
id={todo.id}
value={todo.value}></my-todo>
})}
</div>
: <div></div>
}
</ul>
</div>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment