1.1.0 • Published 5 years ago
recaptcha-hook v1.1.0
recaptcha-hook
recaptcha-hook
is a JavaScript library that lets you easily integrate google recaptcha. recaptcha-hook
uses react hook to create recaptcha component.
Installation
Using npm:
$ npm install --save recaptcha-hook
Get reCAPTCHA sitekey
Go to reCAPTCHA
and click on Admin console
and configure your requirements. After saving all information
you will get sitekey
and secret key
. Copy the site key
and use in the recaptcha-hook component.
// using ES6
import ReCaptcha from 'recaptcha-hook';
<ReCaptcha
elementID={'je'}
siteKey={'xxxxxxxx'}
verifyCallback={verifyCallback}
onloadCallback={() => console.log('loaded')}
/>