title: Formik - How to reset form after confirmation
body: <p>In <a href="https://github.com/jaredpalmer/formik" rel="noreferrer">Formik</a>, how to make the Reset button reset the form only <strong>after confirmation</strong>?</p>
  
  <p>My code below still resets the form even when you click Cancel.</p>
  
  <pre><code>var handleReset = (values, formProps) =&gt; {
      return window.confirm('Reset?'); // still resets after you Cancel :(
  };
  
  return (
    &lt;Formik onReset={handleReset}&gt;
      {(formProps) =&gt; { 
        return (
          &lt;Form&gt;
            ...
            &lt;button type='reset'&gt;Reset&lt;/button&gt;
          &lt;/Form&gt;
        )}}
    &lt;/Formik&gt;
  );
  </code></pre>