Answer the question
In order to leave comments, you need to log in
How to dynamically remove and add a component?
There is a Date component, you need to get data from it. By clicking on the "-" button, we delete the component, by clicking "Add date" we add it again. By clicking "Create event" we form an object to send it to the server.
I tried to show my work here .
What problems I cannot solve:
1. When a component is removed, everything is visually shown correctly, but if the data is printed, it is not correct
. now it works so that the last added date is not pushed into the array
Answer the question
In order to leave comments, you need to log in
I tried to show my work here .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question