React.js Google reCAPTCHA v2 integration component.
MIT License
React.js Google reCAPTCHA v2 integration component.
$ yarn add react-grecaptcha
import Recaptcha from 'react-grecaptcha';
const verifyCallback = response => console.log(response);
const expiredCallback = () => {...};
<Recaptcha
sitekey={RECAPTCHA_SITE_KEY}
callback={verifyCallback}
expiredCallback={expiredCallback}
locale="zh-TW"
className="customClassName"
// Other props will be passed into the component.
data-theme="dark"
/>
window.grecaptcha.reset();
// You can use other functions the same way.
window.grecaptcha.execute
window.grecaptcha.getResponse
window.grecaptcha.render
...
$ yarn install --pure-lockfile
$ yarn start
$ yarn run format
$ yarn run eslint
$ yarn run test:watch
$ yarn run build
$ yarn run build-storybook
$ yarn test
).