I'm creating a formik form to take multiple inputs, as the plus button is clicked the new input fields should render, and when the delete button is clicked that rendered input fields should delete. After entering all the records, by clicking submit button all the entered records should be saved to an array. My question is as I entered all the records, it only save the last set of records. Also, the fields do not reset at the submission. How to fix this?
Here is the full code: codesandbox.io