# @react-web/hover

Latest version **0.1.7** (published 2017-11-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @react-web/hover
pnpm add @react-web/hover
yarn add @react-web/hover
bun add @react-web/hover
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2017-11-18 |
| First published | 2017-07-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | heineiuo |
| Maintainers | heineiuo |

## Links

- npm: https://www.npmjs.com/package/@react-web/hover
- Repository: https://github.com/heineiuo/react-withhover
- Homepage: https://github.com/heineiuo/react-withhover#readme
- Issues: https://github.com/heineiuo/react-withhover/issues
- npm.io page: https://npm.io/package/@react-web/hover

## Recent versions

- 0.1.7 (latest) — 2017-11-18
- 0.1.6 — 2017-11-18
- 0.1.5 — 2017-08-24
- 0.1.4 — 2017-08-24
- 0.1.3 — 2017-08-24
- 0.1.2 — 2017-08-24
- 0.1.1 — 2017-07-27

## README

# @react-shared/hover


## Install

```bash
yarn add @react-shared/hover # or npm install @react-shared/hover
```

## Usage

### high order component
```javascript
import React, {Component} from 'react'
import {withHover} from '@react-shared/hover'

class Example extends Component {
  render(){
    return (
      <div>
        {this.props.isHovered ? 'hovered': 'not hovered'}
      </div>
    )
  }
}

export default withHover(Example)



```

### component

```javascript
import React, {Component} from 'react'
import {Hover} from '@react-shared/hover'

class Example extends Component {
  render() {
    return (
      <Hover>
        {(props) => {
          return (
            <div>
              {this.props.isHovered ? 'hovered': 'not hovered'}
            </div>
          )
        }}
      </Hover>
    )
  }
}

export default Example

```


#### props

* *tagName* the wrapper tagName, default 'dev'
* *className* only work when children is string or array
* *style* only work when children is string or array
* **onStateChange** the hover state, example: 

    ```javascript
      onStateChange = (state) => {console.log(state.isHovered)}
    ``` 

## License

MIT

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