Skip to content

Commit 7c1d040

Browse files
authored
Merge pull request dozoisch#106 from mattgd/master
Fix README.md examples and resolve dozoisch#101
2 parents 0afdd7c + 990c7f2 commit 7c1d040

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Example:
6767
const recaptchaRef = React.createRef();
6868
...
6969
onSubmit = () ={
70-
const recaptchaValue = recaptchaRef.getValue();
70+
const recaptchaValue = recaptchaRef.current.getValue();
7171
this.props.onSubmit(recaptchaValue);
7272
}
7373
render() {
@@ -97,7 +97,7 @@ import ReCAPTCHA from "react-google-recaptcha";
9797
const recaptchaRef = React.createRef();
9898

9999
ReactDOM.render(
100-
<form onSubmit={() => { captcha.execute(); }}>
100+
<form onSubmit={() => { recaptchaRef.current.execute(); }}>
101101
<ReCAPTCHA
102102
ref={recaptchaRef}
103103
size="invisible"

0 commit comments

Comments
 (0)