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
All you need to do is [sign up for an API key pair][signup]. You will need the client key.
31
31
32
-
You can then use the reCAPTCHA. The default require, imports a wrapped component that loads the reCAPTCHA script asynchronously.
32
+
You can then use the reCAPTCHA. The default require imports a wrapped component that loads the reCAPTCHA script asynchronously.
33
33
34
34
```jsx
35
-
var React =require("react");
35
+
var React =require("react").default;
36
36
var render =require("react-dom").render
37
37
var ReCAPTCHA =require("react-google-recaptcha");
38
38
@@ -58,7 +58,7 @@ Other properties can be used to customise the rendering.
58
58
|:---- | ---- | ------ |
59
59
| sitekey | string | The API client key |
60
60
| onChange | func | The function to be called when the user successfully completes the captcha |
61
-
| theme | enum | *optional*`light` or `dark` The theme of the widget *(__defaults:__ light)*
61
+
| theme | enum | *optional*`light` or `dark` The theme of the widget *(__defaults:__ light)*. See [example][docs_theme]
62
62
| type | enum | *optional*`image` or `audio` The type of initial captcha *(__defaults:__ image)*
63
63
| tabindex | number | *optional* The tabindex on the element *(__default:__ 0)*
64
64
| onExpired | func |*optional* callback when the challenge is expired and has to be redone by user. By default it will call the onChange with null to signify expired callback. |
@@ -88,10 +88,10 @@ The component also has some utility functions that can be called.
88
88
89
89
Starting with 0.7.0, the component now supports invisible options. See the [reCAPTCHA documentation](https://developers.google.com/recaptcha/docs/invisible) to see how to configure it.
90
90
91
-
With the invisible option, you need to handle things a bit differently. You will need to call the execute method by yourself.
91
+
With the invisible option, you need to handle things a bit differently. You will need to call the `execute` method yourself.
92
92
93
93
```jsx
94
-
var React =require("react");
94
+
var React =require("react").default;
95
95
var render =require("react-dom").render
96
96
var ReCAPTCHA =require("react-google-recaptcha");
97
97
@@ -120,7 +120,7 @@ render(
120
120
You can also use the barebone components doing the following. Using that component will oblige you to manage the grecaptcha dep and load the script by yourself.
121
121
122
122
```jsx
123
-
var React =require("react");
123
+
var React =require("react").default;
124
124
var render =require("react-dom").render
125
125
var ReCAPTCHA =require("react-google-recaptcha/lib/recaptcha");
0 commit comments