UNPKG

recaptcha-v3-react-function-async

Version:

This library helps to integrate google recaptcha into your react project easily.

16 lines (12 loc) 344 B
'use client' export default async (key) => { try { let script = document.createElement('script') script.src = `https://www.google.com/recaptcha/api.js?render=${key}` script.async = true document.body.appendChild(script) return true } catch (e) { return {err: e} } }