Answer the question
In order to leave comments, you need to log in
Why doesn't the script for TODO work?
https://codepen.io/danilst/pen/gdOjLm
When a new todo is added, the entire list of ever added todos is displayed again.
This was not before I decided to make a list on the components.
Answer the question
In order to leave comments, you need to log in
Because you change the props, and in the loop in the parent, each time you pass this prop again. Make an onDelete event for the child, and catch it from the parent.
https://codepen.io/anon/pen/bxGmMB
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question