score:1

Accepted answer

there are multiple ways you can approach this, one would be to call your saveform inside onsubmit function of formik component and pass the parameter which handle to your saveform which handles the reset event. example

 onsubmit:{(form, actions, resetform ) => {
      saveform(form, actions);
 }}

   const saveform = (form, { resetform }) => {
        //save form code
       resetform();
    }

or you can directly set it to the onsubmit function like this

onsubmit:saveform

this will directly pass all the parameter that onsubmit is recieving to your saveform function.


Related Query

More Query from same tag