React.js Google reCAPTCHA v2 integration component.
- Isomorphic support. (Only render on client side.)
- Lazy load scripts for routing.
- Automatically render the reCAPTCHA widget.
- I18n support.
http:https://www.webpackbin.com/4yr28fNzb
$ npm install react-grecaptcha --save
const verifyCallback = response => console.log(response);
const expiredCallback = () => {...};
<Recaptcha
sitekey={RECAPTCHA_SITE_KEY}
callback={verifyCallback}
expiredCallback={expiredCallback}
locale="zh-TW"
/>
- To reset the recaptcha:
window.grecaptcha.reset();
$ npm run test:watch
- ⇄ Pull requests and ★ Stars are always welcome.
- For bugs and feature requests, please create an issue.
- Pull requests must be accompanied by passing automated tests (
$ npm test
).