-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
Description
When using react-recaptcha in a GatsbyJS project and switching between pages containing the same component with a reCAPTCHA, rendering fails. It also fails when opening a direct link to one of the two pages.
Reproduction
- See repo https://github.com/philonor/gatsby-recaptcha-reproduction that is a gatsby-starter-default clone with two more pages
contact-en.jsandcontact-de.jsthat both contain the sameContactFormcomponent which uses react-recaptcha to render a recaptcha. - Clone it, run
npm i, thengatsby build && gatsby serve, then browse tohttp://localhost:9000/contact-de/to reproduce the error (you may have to hit the refresh button a few times until the error occurrs).
Workarounds
- Requiring explicit rendering and specifying an
onloadCallbackseem to fix the issue ReCAPTCHA placeholder element must be an element or id #181 (comment)
Related
fresquer, naotone, hyrsky and jgthms
Metadata
Metadata
Assignees
Labels
No labels
