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.0.4 to 0.0.5

2

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

@@ -5,0 +5,0 @@ "license": "MIT",

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

const [openMenu, setOpenMenu] = useState(false);
const rigisterRef = useOnclickoutside(() => {
const registerRef = useOnclickoutside(() => {
setOpenMenu(false);

@@ -55,3 +55,3 @@ });

<div onClick={handleClickBtn}>Button</div>
{openMenu && <div ref={rigisterRef}>Menu</div>}
{openMenu && <div ref={registerRef}>Menu</div>}
</div>

@@ -69,3 +69,3 @@ );

const [showTips, setShowTips] = useState(true);
const rigisterRef = useOnclickoutside(() => {
const registerRef = useOnclickoutside(() => {
setShowTips(false);

@@ -78,4 +78,4 @@ });

<>
<Tooltip ref={rigisterRef} />
<Tooltip ref={rigisterRef} />
<Tooltip ref={registerRef} />
<Tooltip ref={registerRef} />
</>

@@ -91,3 +91,3 @@ )}

```js
const rigisterRef = useOnclickoutside(callback[, options]);
const registerRef = useOnclickoutside(callback[, options]);
```

@@ -94,0 +94,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