Formik is one of most popular React libraries, for managing forms and validations. It has inbuilt state-management system. The Fomik series of posts will cover all essential topics regarding form management using Formik.
Reset
Using the resetForm method we can reset the Formik form fields to initial values.
formikForm.resetForm();
For resetting the form fields with custom values we can use the object syntax, in this, have to use all the fields in the formic object (initalValues) as follows.
formikForm.resetForm({values: { name: '', email: '',password:'' }});