dozoisch/react-google-recaptcha

Unable to reset after successful form submission

Open

#170 ouverte le 12 avr. 2020

Voir sur GitHub
 (2 commentaires) (1 réaction) (0 assignés)JavaScript (148 forks)github user discovery
help wanted

Métriques du dépôt

Stars
 (1 081 stars)
Métriques de merge PR
 (Métriques PR en attente)

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.

Guide contributeur