# use-strict-click-handler

> [![NPM](https://img.shields.io/npm/v/use-strict-click-handler.svg)](https://www.npmjs.com/package/use-strict-click-handler)

Latest version **1.0.5** (published 2021-03-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install use-strict-click-handler
pnpm add use-strict-click-handler
yarn add use-strict-click-handler
bun add use-strict-click-handler
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2021-03-29 |
| First published | 2019-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 555.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | ossan-engineer |
| Maintainers | ossan-engineer |

## Links

- npm: https://www.npmjs.com/package/use-strict-click-handler
- Repository: https://github.com/ossan-engineer/use-strict-click-handler
- Homepage: https://github.com/ossan-engineer/use-strict-click-handler#readme
- Issues: https://github.com/ossan-engineer/use-strict-click-handler/issues
- npm.io page: https://npm.io/package/use-strict-click-handler

## Recent versions

- 1.0.5 (latest) — 2021-03-29
- 1.0.4 — 2020-07-23
- 1.0.3 — 2020-04-03
- 1.0.2 — 2019-12-19
- 1.0.1 — 2019-12-19
- 0.1.0 — 2019-12-17

## README

# use-strict-click-handler

[![NPM](https://img.shields.io/npm/v/use-strict-click-handler.svg)](https://www.npmjs.com/package/use-strict-click-handler)

## Install

```bash
npm install --save use-strict-click-handler
```

## Usage

```tsx
import * as React from 'react';
import useStrictClickHandler from 'use-strict-click-handler';

const Example = () => {
  const { handlers } = useStrictClickHandler(() =>
    console.log('STRICT CLICKED!')
  );
  return (
    <>
      <div className="App" {...handlers}>
        <h1>STRICT CLICK</h1>
        <ol>
          <li>Open console.</li>
          <li>Click or drag inside this component.</li>
          <li>Drag events are excluded.</li>
        </ol>
      </div>
      <div className="App" onClick={() => console.log('NORMAL CLICKED!')}>
        <h1>NORMAL CLICK</h1>
        <ol>
          <li>Open console.</li>
          <li>Click or drag inside this component.</li>
          <li>Drag events are included.</li>
        </ol>
      </div>
    </>
  );
};
```

## Demo

https://odd-aunt.surge.sh/

## License

MIT © [ossan-engineer](https://github.com/ossan-engineer)

---

This hook is created using [create-react-hook](https://github.com/hermanya/create-react-hook).

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