2

My recaptcha on my web app is stuck like this I m using react-google-recaptcha package

I did not know what you try. I expect it to move to next part of my code

This is the console

Here is a part of code:

// what code is returning
            <ReCAPTCHA
                sitekey={RECAPTCHA_SITE_KEY}
                size="invisible"
                ref={recaptchaRef}
            />

//Handle submit
async function handleSubmit(event) {
        event.preventDefault()
        const key = await recaptchaRef.current.executeAsync()
        ...

1 Answer 1

0

You need to reset the recaptcha after having use executeAsync.

    async function handleSubmit(event) {
        event.preventDefault()
        const key = await recaptchaRef.current.executeAsync()
        recaptchaRef.current.reset()

See this github issue for more information : https://github.com/dozoisch/react-google-recaptcha/issues/191#issuecomment-1634072885