There is a problem with my small todo app. Every time I try to delete an item there is an error Cannot read property 'todos' of undefined
Why this
is bound inside addTodo
but not removeTodo
?
The trigger is done here: <button onClick={() => removeTodo(id)}> X </button>
Demo on JSfiddle
Thanks.