I am trying to utilize the react-google-recaptcha library to add a captcha widget to a webpage. First, I registered through google and got my set of keys. Then, I pasted the code available here: https://developers.google.com/recaptcha/docs/display under "automatically render the recaptcha widget". This is the html of my page:
</head>
<body>
<form action="?" method="POST">
<div class="g-recaptcha" data-sitekey="6Ldz_GUcAAAAADwKwgw0E0LpHF58_PpaRvvdcMWz"> </div>
<br/>
<input type="submit" value="Submit"></input>
</form>
</body>
The header won't show up in in markdown but I did not change it from what was given on the site. According to the site, that should have been all that was needed to render the widget, but when I run my app locally, I do not see it. I've also tried code provided by the react-google-recaptcha developers, shown here:
import ReCAPTCHA from "react-google-recaptcha";
function onChange(value) {
console.log("Captcha value:", value);
}
ReactDOM.render(
<ReCAPTCHA
sitekey="6Ldz_GUcAAAAADwKwgw0E0LpHF58_PpaRvvdcMWz"
onChange={onChange}
/>,
document.body
);
but that didn't work either. Any help would be appreciated.