# convect

> Custom React Hooks to enhance rapid prototyping.

Latest version **0.0.8** (published 2020-12-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install convect
pnpm add convect
yarn add convect
bun add convect
```

## 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.0.8 |
| Published | 2020-12-10 |
| First published | 2020-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Rusu Traian Cristian |
| Maintainers | rusutraiancristian |
| Keywords | react, hooks, functional, fetch, api |

## Links

- npm: https://www.npmjs.com/package/convect
- Repository: https://github.com/RusuTraianCristian/Convect
- Homepage: https://github.com/RusuTraianCristian/Convect#readme
- Issues: https://github.com/RusuTraianCristian/Convect/issues
- npm.io page: https://npm.io/package/convect

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^16.13.1
- [react-dom](https://npm.io/package/react-dom.md) ^16.13.1

## 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

- 0.0.8 (latest) — 2020-12-10
- 0.0.7 — 2020-07-26
- 0.0.6 — 2020-07-24
- 0.0.5 — 2020-06-11
- 0.0.4 — 2020-06-11
- 0.0.3 — 2020-06-11
- 0.0.2 — 2020-06-11
- 0.0.1 — 2020-06-11

## README

# Convect

Custom React Hooks to enhance rapid prototyping.

## Installation

Use [npm](https://www.npmjs.com/get-npm) to install Convect.

```bash
npm i convect
```
## Usage

```javascript
import { useFetch, useStorage } from 'convect';

const options = {
    // url
    // method
    // headers
    // body
}

const [data, status] = useFetch(options);
// returns an array with the fetched data and its corresponding status code

const data = useStorage(storage, method, key, value);
// accepts localStorage or sessionStorage as the storage type
// methods (string) 'set'or 'get''
// key/value optionals

// returns the value of 'key' on both set/get as React state
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

This is a small library of custom React hooks made to ease my work when dealing with React web applications. I've found myself repeating code many times when dealing with changing themes and storing information in localStorage, as well as repeating fetch calls with just some different arguments. SO I've figured to build some hooks to simply import and use when needed.

## License
[MIT](https://choosealicense.com/licenses/mit/)

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