Closed alechko closed 1 year ago
closing my issue as the solution is actually in Docusaurus SSR, wrapping the form with <BrowserOnly>
fixed this issue.
Yeah, I think that is necessary. ReCAPTCHA requires some interactions with the Window
object and generally the DOM (that is, outside of React's VDOM state), so it cannot be correctly rendered server-side.
When using ReCAPTCHA in Docusaurus build the callbacks are throwing an error:
ReCAPTCHA couldn't find user-provided function: Nd-Js-alO_sDUNCE_sZ10 recaptcha__en.js:231:455
In development version there's no issue and it works fine, but running from
build
the callback is not working, any idea what's the issue?"react": "^17.0.2", "react-dom": "^17.0.2", "@matt-block/react-recaptcha-v2": "^2.0.0"