appleboy/react-recaptcha

Multiple Instances

WoadWork opened this issue · 1 comments

I have 2 separate modals and want to use reCaptcha in each.

I am able to successfully render reCaptcha in 1 modal but am not able to render both.

How do I render multiple instances of reCaptcha ?

Issue solved:

Define elementID(as prop of reCaptcha component) of each individual instance.

<Recaptcha elementID='mobile' verifyCallback={ ()=> this.recaptchaVerified() } sitekey="xxxx" render="explicit" onloadCallback={()=> {console.log('recaptcha loaded')}} expiredCallback={() => this.setState({recaptchaVerified: false})}/>

i wrote like this and it is still not working