dozoisch/react-google-recaptcha

Unable to reset after successful form submission

Open

#170 aberto em 12 de abr. de 2020

Ver no GitHub
 (2 comments) (1 reaction) (0 assignees)JavaScript (148 forks)github user discovery
help wanted

Métricas do repositório

Stars
 (1.081 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

"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.

Guia do colaborador