dozoisch/react-google-recaptcha
Auf GitHub ansehenUnable to reset after successful form submission
Open
#170 geöffnet am 12. Apr. 2020
help wanted
Repository-Metriken
- Stars
- (1.081 Stars)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
"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.