Hey there,
I have a reCaptcha element as below and have set a ternary condition in the size prop to change the size based on a breakpoint however it does not seem to re-render. The isMobile variable is definitely updating. Wondering if there is a particular way to handle this with react-recaptcha:
<Recaptcha
sitekey={process.env.GATSBY_GOOGLE_CAPTCHA_SITEKEY}
render="explicit"
size={isMobile ? 'compact' : 'normal'}
onloadCallback={recaptchaLoaded}
verifyCallback={recaptchaVerified}
expiredCallback={recaptchaReset}
/>
thanks for the great snippet!
Hey there,
I have a reCaptcha element as below and have set a ternary condition in the size prop to change the size based on a breakpoint however it does not seem to re-render. The
isMobilevariable is definitely updating. Wondering if there is a particular way to handle this with react-recaptcha:<Recaptchasitekey={process.env.GATSBY_GOOGLE_CAPTCHA_SITEKEY}render="explicit"size={isMobile ? 'compact' : 'normal'}onloadCallback={recaptchaLoaded}verifyCallback={recaptchaVerified}expiredCallback={recaptchaReset}/>