After selecting all the correct images the captcha shows you, the recaptcha doesn't get re-rendered with a pass (green check)
See original GitHub issueI’m adding a <ReCaptcha />
component inside a redux-forms <Field />
component, the below <Field />
component is returned by the render function of the myForm component I have:
<Field name='captcha' size="normal" theme="dark" component={(formProps) => this.renderReCaptcha(formProps)} />
This is my renderReCaptcha function that returns the <ReCaptcha />
component:
renderReCaptcha = (formProps) => {
return(
<div>
<ReCaptcha
ref={(ref) => {this.captcha = ref;}}
size={formProps.size}
theme={formProps.theme}
sitekey="<SOME-KEY>"
onChange={this.onChange}
/>
</div>
);
}
After selecting all the correct images the captcha shows you and clicking ‘Verify’, I get a recaptchaToken back which means it passed, however, the recaptcha doesn’t get re-rendered with a pass (green check) like below:
instead it goes back to:
Is that what’s supposed to happen?. On the codesandbox.io example as soon as you click on it it goes to:
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
reCAPTCHA Help - Google Support
Official reCAPTCHA Help Center where you can find tips and tutorials on using reCAPTCHA and other answers ... If you see a green...
Read more >How to Fix Captcha Image Not Showing in Google Chrome?
Learn how to fix captcha image not showing in Google Chrome and load the image so that you can login or submit form...
Read more >FIX Recaptcha Not Working in Google Chrome [Tutorial]
ReCaptcha will actively look at the browser version before allowing you access. This is applicable to all browser versions, not just Chrome.
Read more >How to FIX Recaptcha Not Working in Google Chrome
How to resolve reCAPTCHA not working in Google Chrome browser? in Windows 10 / Windows 11. Fixed: Google Chrome ReCAPTCHA Not Working ...
Read more >reCAPTCHA Not Working - Restream Help Center
Here are potential reasons why reCAPTCHA is not working for you . Chrome is not updated to the latest version. One...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Using Reatc.PureComponent and/or the lifecycle shouldComponentUpdate is the way to do it.
https://reactjs.org/docs/react-api.html#reactpurecomponent
The re-render should not be an issue. The problem is the component unmounting and remounting. You have something in your component tree somewhere that gets a different key that causes a full remount
Thanks a lot for your help @dozoisch.