@wojtekmaj/react-recaptcha-v3
Version:
Integrate Google reCAPTCHA v3 with your React app
16 lines (12 loc) • 433 B
text/typescript
import { useContext } from 'react';
import ReCaptchaContext from './ReCaptchaContext.js';
import type { ReCaptchaContextType } from './ReCaptchaContext.js';
/**
* useReCaptcha hook
*
* @description This hook is used to get the Google reCAPTCHA v3 context.
* @returns {ReCaptchaContextType} Google reCAPTCHA v3 context
*/
export default function useReCaptcha(): ReCaptchaContextType {
return useContext(ReCaptchaContext);
}