dozoisch/react-google-recaptcha

Unable to reset after successful form submission

Open

#170 aperta il 12 apr 2020

Vedi su GitHub
 (2 commenti) (1 reazione) (0 assegnatari)JavaScript (148 fork)github user discovery
help wanted

Metriche repository

Star
 (1081 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

"react-google-recaptcha": "^2.0.1"

Method 1:

`const Contact = () => { const recaptchaRef = React.createRef();

const verifyCallback = () => { console.log( recaptchaRef.current.getValue() ) } return(

Method 2:

`const Contact = () => { let recaptchaRef;

const verifyCallback = () => { console.log( recaptchaRef) } return( <ReCAPTCHA sitekey="key" onChange={verifyCallback} theme="dark" ref = {e => recaptchaRef = e} />

Both method gave null.

Guida contributor