@gahojin-inc/react-google-recaptcha
v2025.11.1
Published
Hooks for Google ReCaptcha V3
Readme
react-google-recaptcha
Google ReCaptcha V2/V3をReact Hooksとして提供するライブラリ
使い方
import { GoogleReCaptchaProvider } from '@gahojin-inc/react-google-recaptcha'
const App = () => {
return (
<GoogleReCaptchaProvider siteKey={siteKey} language="ja">
<Example />
</GoogleReCaptchaProvider>
)
}import { useGoogleRecaptcha } from '@gahojin-inc/react-google-recaptcha'
const Example = () => {
const { isLoading, execute } = useGoogleRecaptcha()
const handleClick = useCallback(async () => {
const token = await execute('action')
console.log(token)
}, [execute])
}ライセンス
Copyright 2025, GAHOJIN, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.