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.

貢獻者指南