google recaptcha v2 invisible react for function code example
Example: react-google-invisible-recaptcha
redoCaptcha() {
this._reCaptchaRef.current.reset();
this._reCaptchaRef.current.execute();
}
render() {
...
<ReCAPTCHA
onExpired={this.redoCaptcha}
/>
}