title: Formik setting errors on submission
body: <p>I have 2 questions</p>
  <ol>
  <li><p>I am trying to handle a submission in <code>Formik</code>. I would like to handle the authentication in my backend and then depending on what my backend returns, set an error &quot;Invalid email/password combo&quot; or redirect to a new page (let's say <code>index</code>). Here is the code handling the submission:</p>
  <pre><code> handleSubmit(
     {email, password}: LoginFormValues,
     {props, setSubmitting, setErrors}
   ){
     fetch(backendURL, {
       method: &quot;POST&quot;,
       body: JSON.stringify({username: email, password: password}),
       headers: {
         'Content-Type': 'application/json'
       },
     })
     .then(response =&gt; response.json())
     .then(data =&gt; {
         if(data.token) {
             localStorage.setItem(&quot;token&quot;, data.token)
             props.history.push(&quot;/&quot;)
         }else{
           //TODO
         }
     });
  }
  </code></pre>
  </li>
  </ol>
  <p>If the response contains a token then I'll redirect to <code>index</code> however if doesn't then I'd like to display some errors. Is there a way I can do this with Formik or do I need to redirect to the page that contains my form and print an error message there? (If so, how would I do that anyway because I cannot return <code>&lt;Redirect /&gt;</code> (I have to use <code>history.push(...)</code> right?</p>
  <ol start="2">
  <li>I am aware that most of the times when you submit a form (and get redirected to a new page), if you try to navigate backwards it'll say something along the lines of &quot;form needs to be resubmitted&quot;. However, when I go back in my application it simply renders the form again. Is that something I should be worried about? (What is the motivation in the first place?)</li>
  </ol>