Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hcaptcha/react-hcaptcha

Package Overview
Dependencies
Maintainers
4
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hcaptcha/react-hcaptcha - npm Package Compare versions

Comparing version 0.3.5 to 0.3.6

types/index.d.ts

4

dist/index.js

@@ -222,2 +222,6 @@ "use strict";

}, function () {
// trigger onLoad if it exists
var onLoad = _this3.props.onLoad;
if (onLoad) onLoad(); // render captcha
_this3.renderCaptcha();

@@ -224,0 +228,0 @@ });

10

package.json
{
"name": "@hcaptcha/react-hcaptcha",
"version": "0.3.5",
"version": "0.3.6",
"types": "types/index.d.ts",
"main": "dist/index.js",
"files": [
"src",
"dist",
"types/index.d.ts"
],
"description": "A React library for hCaptcha",
"main": "dist/index.js",
"scripts": {

@@ -7,0 +13,0 @@ "start": "webpack-dev-server --config ./webpack.config.js --mode development",

@@ -36,9 +36,2 @@ # React hCaptcha Component Library

#### Usage with TypeScript
Add the types from DefinitelyTyped
```
npm i -D @types/hcaptcha__react-hcaptcha
```
**A note about TypeScript usage:** If you want to reassign the component name, you could consider making a util that imports the component, then re-exports it as a default. Example:

@@ -90,2 +83,3 @@

|`onExpire`|-|When the current token expires.|
|`onLoad`|-|When the hCaptcha API loads.|

@@ -92,0 +86,0 @@ ### Methods

@@ -158,2 +158,7 @@ const React = require('react');

this.setState({ isApiReady: true }, () => {
// trigger onLoad if it exists
const { onLoad } = this.props;
if (onLoad) onLoad();
// render captcha
this.renderCaptcha();

@@ -160,0 +165,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc