# use-onclickoutside-hooks

> # Installing

Latest version **1.0.7** (published 2022-01-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install use-onclickoutside-hooks
pnpm add use-onclickoutside-hooks
yarn add use-onclickoutside-hooks
bun add use-onclickoutside-hooks
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2022-01-28 |
| First published | 2022-01-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | vanphudhsp2015 |

## Links

- npm: https://www.npmjs.com/package/use-onclickoutside-hooks
- Repository: https://github.com/vanphudhsp2015/useOnClickOutside
- Homepage: https://github.com/vanphudhsp2015/useOnClickOutside#readme
- Issues: https://github.com/vanphudhsp2015/useOnClickOutside/issues
- npm.io page: https://npm.io/package/use-onclickoutside-hooks

## Recent versions

- 1.0.7 (latest) — 2022-01-28
- 1.0.6 — 2022-01-28
- 1.0.5 — 2022-01-28
- 1.0.4 — 2022-01-28
- 1.0.3 — 2022-01-28
- 1.0.2 — 2022-01-28
- 1.0.1 — 2022-01-28
- 1.0.0 — 2022-01-28

## README

# Use Onclickoutside hooks

# Installing

Using npm

```ruby
$ npm install use-onclickoutside-hooks
import useOnClickOutside from 'use-onclickoutside-hooks'
```

Using yarn

```ruby
$ yarn add use-onclickoutside-hooks
import useOnClickOutside from 'use-onclickoutside-hooks'
```

# Example

```ruby
import React, { useRef } from 'react';
import { useOnClickOutside } from 'use-onclickoutside-hooks';

export default function ComponentTest({ items = [] }) {
  const ref = useRef();

  useOnClickOutside(ref, () => {
    ... use function
  });
  return (
    <div className="d-flex flex-row" ref={ref}>
      contet
    </div>
  );
}

```

---
_Source: https://npm.io/package/use-onclickoutside-hooks · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
