T
T
thehighhomie2017-10-04 16:28:43
React
thehighhomie, 2017-10-04 16:28:43

React: why is the mini app not working correctly?

Good afternoon! I understand React, I wrote a mini application with tasks: https://jsfiddle.net/47tfojLa/
But for some reason it doesn’t work as it should, although in theory it should work as it should, namely:
When you click on the button, delete the task, the task should be deleted, but in fact the last one is always deleted, even if you delete the first one. I've already broken my head with this error, there is very little code, and as for me, everything is fine with the code, but the application behaves incomprehensibly ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alvvi, 2017-10-04
@thehighhomie

https://jsfiddle.net/47tfojLa/1/
Don't use indexes as keys

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question