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

react-cool-onclickoutside

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-cool-onclickoutside - npm Package Compare versions

Comparing version 0.1.2 to 0.5.0

6

package.json
{
"name": "react-cool-onclickoutside",
"version": "0.1.2",
"version": "0.5.0",
"description": "React hook to listen for clicks outside of the component(s).",

@@ -59,3 +59,3 @@ "license": "MIT",

"clean": "run-p clean:*",
"coveralls": "yarn test:cov && cat ./coverage/lcov.info | coveralls"
"coveralls": "cat ./coverage/lcov.info | coveralls"
},

@@ -218,3 +218,3 @@ "husky": {

"eslint-plugin-react-hooks": "^2.3.0",
"husky": "^4.0.2",
"husky": "^4.0.5",
"jest": "^24.9.0",

@@ -221,0 +221,0 @@ "lint-staged": "^9.5.0",

@@ -58,3 +58,3 @@ # React Cool Onclickoutside

const handleClickBtn = () => {
setOpenMenu(true);
setOpenMenu(!openMenu);
};

@@ -71,2 +71,4 @@

[![Edit useOnclickoutside demo](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/useonclickoutside-demo-g185l?fontsize=14&hidenavigation=1&theme=dark)
Support multiple refs. Callback only be triggered when user clicks outside of the registered components.

@@ -104,3 +106,3 @@

You must pass the `callback` to use this hook and you can access the [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent) or [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent) via the `event` parameter as below:
You must pass the `callback` to use this hook and you can access the [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent) or [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent) via the `event` parameter as below.

@@ -107,0 +109,0 @@ ```js

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