# react-hooklib

> Helpers working around React Hooks API

Latest version **1.0.3** (published 2019-04-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-hooklib
pnpm add react-hooklib
yarn add react-hooklib
bun add react-hooklib
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-04-19 |
| First published | 2019-04-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 34.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James Yang |
| Maintainers | cssobj |
| Keywords | react, hooks |

## Links

- npm: https://www.npmjs.com/package/react-hooklib
- npm.io page: https://npm.io/package/react-hooklib

## Dependencies (1)

- [fbjs](https://npm.io/package/fbjs.md) ^1.0.0

## 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.3 (latest) — 2019-04-19
- 1.0.2 — 2019-04-18
- 1.0.1 — 2019-04-13
- 1.0.0 — 2019-04-13

## README

# react-hooklib

Helpers working around [React Hooks API](https://reactjs.org/docs/hooks-reference.html).

This lib want keep as `helpers`, but not targeting a fullly [Custom Hooks](https://reactjs.org/docs/hooks-custom.html), it's targeting dev experience when building component based on React Hooks.

[![Build Status](https://travis-ci.org/futurist/react-hooklib.svg?branch=master)](https://travis-ci.org/futurist/react-hooklib)
[![NPM Version](https://img.shields.io/npm/v/react-hooklib.svg)](https://www.npmjs.com/package/react-hooklib)


### Install

You can install from [NPM](https://www.npmjs.com/package/react-hooklib), or use files in `lib`.

```sh
npm install --save react-hooklib
```

### Usage

This lib require [React 16.8.0](https://reactjs.org/blog/2019/02/06/react-v16.8.0.html) or later, since it's based on [React Hooks API](https://reactjs.org/docs/hooks-reference.html).

Each helper can be imported individually:

```js
import {onDidMount, onWillUnmount} from 'react-hooklib';
function Hello(){
  onDidMount(()=>{
    console.log('component did mount!');
  });
  onWillUnmount(()=>{
    console.log('component will unmount!');
  });
  return <div>Hello</div>
}
```

### API

[See API Document](https://github.com/futurist/react-hooklib/blob/master/api.md)

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