Preface: I'm using both reCAPTCHA V3 and V2 versions in the same app, is it legal? 🤔
I'm getting quite weird error while navigating between the pages. Explicit render gives me the same result.
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'badge')
at VM34 recaptcha__en.js:414:153
at r._renderRecaptcha (index.tsx:137:1)
at index.tsx:216:1
at new Promise (<anonymous>)
at r.renderExplicitly (index.tsx:209:1)
at p.<anonymous> (index.tsx:125:1)
at callCallback (react-dom.development.js:13923:1)
at commitUpdateQueue (react-dom.development.js:13944:1)
at commitLayoutEffectOnFiber (react-dom.development.js:23364:1)
at commitLayoutMountEffects_complete (react-dom.development.js:24688:1)
A workaround for me is to make React Router to reload the page, then error disappears.
That's how I render it so far: https://github.com/igops/tutorials/blob/main/njs-recaptcha-react/src/components/PhotoUnlockerRCv2.jsx#L41
P.S. I'm not an expert in React, so please don't be too harsh.
