How do I have a nested formik form or form field that generates a list without creating addditional fields?

Viewed 725

For example, if I want to create a user signup form that also has a field to add pets, which generates a bullet point list of pets that you can delete from, how would I do that with formik? Is there a correct approach for the example image below where I can add and delete pets in that way without having a form field for each pet and upon clicking submit it submits a name field along with an array of pet names?

example image

1 Answers

you can do it with FieldArray of Formik

Related