use-google-recaptcha
v1.0.1
Published
React side-effect hook that shows browser alert when user try to reload or close the page.
Downloads
3
Readme
use-google-recaptcha
React Google Recaptcha V3
Installation
To install the package, use npm:
pnpm add use-google-recaptcha
yarn install use-google-recaptcha
npm install use-google-recaptcha
Usage
import { useGoogleReCaptcha } from 'use-google-recaptcha';
const {
execute,
executing,
} = useGoogleReCaptcha({
key: 'Google Recaptcha V3 key'
});
console.log('[Google Recaptcha V3]:Executing', executing ? `YES` : 'NO');
const token = await execute();
console.log('[Google Recaptcha V3]:Token', token);
tsup
Bundle your TypeScript library with no config, powered by esbuild.
https://tsup.egoist.dev/
How to use this
- install dependencies
# pnpm
$ pnpm install
# yarn
$ yarn install
# npm
$ npm install
- Add your code to
src
- Add export statement to
src/index.ts
- Test build command to build
src
. Once the command works properly, you will seedist
folder.
# pnpm
$ pnpm run build
# yarn
$ yarn run build
# npm
$ npm run build
- Publish your package
$ npm publish
test package
https://www.npmjs.com/package/use-google-recaptcha