https://github.com/zmitry/use-clickoutside
handle outside click with react hooks
https://github.com/zmitry/use-clickoutside
hooks outsideclick react typescript
Last synced: 10 months ago
JSON representation
handle outside click with react hooks
- Host: GitHub
- URL: https://github.com/zmitry/use-clickoutside
- Owner: zmitry
- Created: 2018-11-05T17:12:17.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-05T20:35:07.000Z (about 7 years ago)
- Last Synced: 2025-01-28T03:41:49.906Z (12 months ago)
- Topics: hooks, outsideclick, react, typescript
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# use-clickoutside
React hook for outside clicks.
```jsx
import * as React from 'react'
import useOutsideClick from 'use-clickoutside'
export default function App({ close }) {
const ref = useOutsideClick(close)
return
content
}
```