You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,13 +37,17 @@ The complete documentation to the enterprise version you can see [here](https://
37
37
38
38
`GoogleReCaptchaProvider`'s responsibility is to load the necessary reCaptcha script and provide access to reCaptcha to the rest of your application.
39
39
40
-
You can customize the injected `script` tag with the `scriptProps` prop. This prop allows you to add `async`, `defer`, `nonce` attributes to the script tag. You can also control whether the injected script will be added to the document body or head with `appendTo` attribute. Example can be found belows. The `scriptProps` and its attributes are all optional.
40
+
Usually, your application only needs one provider. You should place it as high as possible in your React tree. It's to make sure you only have one instance of Google Recaptcha per page and it doesn't reload unecessarily when your components re-rendered.
41
41
42
-
It also provides an optional prop `language` to support different languages that is supported by Google Recaptcha.
Same thing applied when you use this library with framework such as Next.js or React Router and only want to include the script on a single page. Try to make sure you only have one instance of the provider on a React tree and to place it as high (on the tree) as possible.
44
43
45
-
The provider also provide the prop `useRecaptchaNet` to load script from `recaptcha.net`:
| reCaptchaKey | Boolean || Yes | Your recaptcha key, get one from [here](https://www.google.com/recaptcha/intro/v3.html)|
47
+
| scriptProps | Object || No | You can customize the injected `script` tag with this prop. It allows you to add `async`, `defer`, `nonce` attributes to the script tag. You can also control whether the injected script will be added to the document body or head with `appendTo` attribute. |
48
+
| language | String || No | optional prop to support different languages that is supported by Google Recaptcha. https://developers.google.com/recaptcha/docs/language|
49
+
| useRecaptchaNet | Boolean | false | No | The provider also provide the prop `useRecaptchaNet` to load script from `recaptcha.net`: https://developers.google.com/recaptcha/docs/faq#can-i-use-recaptcha-globally|
50
+
| useEnterprise | Boolean | false | No |[Enterprise option](#enterprise)|
0 commit comments