dozoisch/react-google-recaptcha

Unable to reset after successful form submission

Open

#170 创建于 2020年4月12日

在 GitHub 查看
 (2 评论) (1 反应) (0 负责人)JavaScript (148 fork)github user discovery
help wanted

仓库指标

Star
 (1,081 star)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南