title: How to reset Google recaptcha with react-google-recaptcha
body: <p>Looks like the google recaptcha works in such a way that if a verification attempt has been made with a particular token, it cannot be used again.</p>
  <p>Docs states that &quot;you will need to call grecaptcha.reset() to ask the end user to verify with reCAPTCHA again&quot;</p>
  <p>I'm trying to attempt this using the react-google-recaptcha npm package.</p>
  <p>Here is my code:</p>
  <pre><code>function onChange(grecaptcha) {
    console.log(grecaptcha);
    grecaptcha.reset(); // this doesn't work
  }
  
  class Captcha extends React.Component {
    render() {
      return &lt;div&gt;
        &lt;Recaptcha
            sitekey='#'
            onChange={onChange(this)}
        /&gt; &lt;/div&gt; 
    }
  }
  </code></pre>
  <p>When I tried to do the server side validations using the google api <a href="https://www.google.com/recaptcha/api/siteverify" rel="noreferrer">https://www.google.com/recaptcha/api/siteverify</a> with response and secret value, the success response always evaluates to &quot;false&quot; after the first validation.
  To prevent this I'm resetting the grecaptcha as suggested in the docs but it doesn't work.</p>
  <p>Anything that I'm missing?</p>
  <p>Thanks in advance</p>
  <p>EDIT:</p>
  <p><a href="https://github.com/dozoisch/react-google-recaptcha" rel="noreferrer">https://github.com/dozoisch/react-google-recaptcha</a> offers the reset() utility function which is what I'm trying to call after the user solves the captcha, wondering if I'm not calling it the right way.</p>