responsive design on size prop

Open
#322 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, react
Domain
frontend

Research direction

Start by reproducing the provided Recaptcha usage with the size prop changing from compact to normal at a breakpoint. Inspect how the component handles size updates after initialization and confirm whether the widget changes size when isMobile updates; done means the responsive size behavior is defined and verified.

Written by the indexing model from the issue text.

Description

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!
Dominant language
JavaScript
Stars
643
Forks
96
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from appleboy/react-recaptcha

All issues in appleboy/react-recaptcha

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.