# react-with-hooks-odgn

> Ponyfill for the [proposed React Hooks API](https://reactjs.org/docs/hooks-intro.html).

Latest version **1.0.0** (published 2018-10-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-with-hooks-odgn
pnpm add react-with-hooks-odgn
yarn add react-with-hooks-odgn
bun add react-with-hooks-odgn
```

## 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.0 |
| Published | 2018-10-29 |
| First published | 2018-10-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 16 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | odogono |

## Links

- npm: https://www.npmjs.com/package/react-with-hooks-odgn
- npm.io page: https://npm.io/package/react-with-hooks-odgn

## Recent versions

- 1.0.0 (latest) — 2018-10-29

## README

# react-with-hooks

Ponyfill for the [proposed React Hooks API](https://reactjs.org/docs/hooks-intro.html).

## Install

```bash
$ npm i odgn-react-with-hooks --save
```

## Example

```javascript
import withHooks, { useState, useEffect } from 'odgn-react-with-hooks';

const Counter = withHooks(() => {
  const [ count, setCount ] = useState(0);
  useEffect(() => {
    document.title = "count is " + count;
  })
  return (
    <div>
       {count}
       <button onClick={() => setCount(count + 1)}>+</button>
       <button onClick={() => setCount(count + 1)}>-</button>
    </div>
  );
});
```

[Live Demo](https://codesandbox.io/s/olx6zp44n6)

## API Reference

- Basic Hooks
  - [useState](https://reactjs.org/docs/hooks-reference.html#usestate)
  - [useEffect](https://reactjs.org/docs/hooks-reference.html#useeffect)
  - [useContext](https://reactjs.org/docs/hooks-reference.html#usecontext)
- Additional Hooks
  - [useReducer](https://reactjs.org/docs/hooks-reference.html#usereducer)
  - [useCallback](https://reactjs.org/docs/hooks-reference.html#usecallback)
  - [useMemo](https://reactjs.org/docs/hooks-reference.html#usememo)
  - [useRef](https://reactjs.org/docs/hooks-reference.html#useref)
  - [useImperativeMethod](https://reactjs.org/docs/hooks-reference.html#useimperativemethods)
  - [useMutationEffect](https://reactjs.org/docs/hooks-reference.html#usemutationeffect)
  - [useLayoutEffect](https://reactjs.org/docs/hooks-reference.html#uselayouteffect)

## License

[MIT](./LICENSE)

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