Objects are not valid as a React child Error
See original GitHub issueHi, 2 days ago, it works perfectly fine, but today I run my project again and this happens:
Objects are not valid as a React child (found: object with keys {$$typeof, render, displayName, propTypes, sitekey, onChange}). If you meant to render a collection of children, use an array instead. in wrapWithAsyncScript (at LoginModal.js:152) in div (at LoginModal.js:147) in LoginModal (at Authentication.js:30) in div (at Authentication.js:28) in Authentication (created by Form(Authentication)) in Form(Authentication) (at App.js:8) in App (at index.js:7)
I swear to God that I changed nothing since the day it worked. I tried to implement only the recaptcha in a new empty project and it still happens, here is my code:
<div>
<ReCAPTCHA
sitekey="My Code"
onChange={() => {}}
/>
</div>
Is there anything wrong with the library ? I’m using React version 16.4.1
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:13 (4 by maintainers)
That seems to have fixed that issue, thanks for the speedy reply!
However, I am now getting this.
I’m unsure if it’s a “me” issue but it started occurring after updating to version 0.14.1.
Ah found the issue, it’s because it’s using 1.0.0 from react-async-script instead of the pre 1.0 because the range was too vast… I’ll release a 0.14.1 to fix that.
In the mean time add
"react-async-script": "0.11.1"
if you are running < 1.0