I have to use gatsby-plugin-recaptcha for forms in my project. I am not able to find any example of usage of this plugin. It will be big help if someone can share any information regarding this.
Thanks
Add a unique random identifier at the end of Google's reCaptcha script so each page has his own reCaptcha script. Then, add reCaptcha div in your form. No need of complex Gatsby plugin.
Gatsby is a modern static-site generator that has revamped the way static websites are being built. It incorporates React, Node. js, and GraphQL to create stunning and blazing-fast websites.
Place this code in your component
and import <Helmet/>
from react-helmet.
<React.Fragment>
<Helmet>
<script src={`https://www.google.com/recaptcha/api.js?r=${Math.random()}`} async defer>
</script>
</Helmet>
<form>
<div className="g-recaptcha" data-sitekey={REACAPTCHA_PUBLIC}>
</div>
</form>
</React.Fragment>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With