title: React-hook-form on submit and useState issue
body: <p>Hey so im facing this strange issue while using react-hook-form.</p>
  
  <p>This is the gist of my code</p>
  
  <pre><code>const [error, setError] = useState(true)
  
  const onSubmit = values =&gt; {
      setError(false)
      console.log(error) // true on first click and false on second click
  }
  &lt;input type="submit" /&gt;
  </code></pre>
  
  <p>As you'll can see I get error as true the first time I click on input and false the second time I click it.</p>
  
  <p>I expect error to be false the first time I click on input does anyone know why it's true?</p>
  
  <p>Note: My form is a nested form where I use FormContext to wrap my form so I can split the form into smaller components. Could it be that that's causing this side-effect or is it just something obvious that I'm missing?</p>