# @gitgw/use-hover

> React Hook to detect a hover on an any React Element.

Latest version **1.0.2** (published 2021-05-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @gitgw/use-hover
pnpm add @gitgw/use-hover
yarn add @gitgw/use-hover
bun add @gitgw/use-hover
```

## 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.2 |
| Published | 2021-05-13 |
| First published | 2021-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | GW |
| Maintainers | githubgw |
| Keywords | react, react-hooks, hooks, hover, usehover, mouseenter |

## Links

- npm: https://www.npmjs.com/package/@gitgw/use-hover
- Repository: https://github.com/GitHubGW/react-hook-npm
- Homepage: https://github.com/GitHubGW/react-hook-npm#readme
- Issues: https://github.com/GitHubGW/react-hook-npm/issues
- npm.io page: https://npm.io/package/@gitgw/use-hover

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2021-05-13
- 1.0.1 — 2021-05-13
- 1.0.0 — 2021-05-13

## README

# @gitgw/use-hover
React Hook to detect a hover on an any React Element.

## Installation
### npm
```npm i @gitgw/use-hover```

### yarn
```yarn add @gitgw/use-hover```

## Usage
```javascript
import React from "react";
import useHover from "@gitgw/use-hover";

function App() {

  const onHover = ()=>{
    console.log("OnHover");
  }

  const markedRef = useHover(onHover);
  
  return (
    <div className="App">
      <div ref={markedRef}>Hello</div>
    </div>
  );
}
```

### Arguments
Argument|Type|Description|Required|
|-|-|-|-|
|onHover|Function|Function to be called when the element is hovered|yes

### Return
Return value|Type|Description|Default value|
|-|-|-|-|
|ref|React ref|A React ref listening to the hover event, add it to any element|null

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