# origen

> A zero dependency, React utility library, filled with useful hooks to make your React experience even better.

Latest version **0.0.6** (published 2021-04-20) · MIT license · 0 weekly downloads

## Install

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

## 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.6 |
| Published | 2021-04-20 |
| First published | 2021-04-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 19 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | askharley |
| Maintainers | askharley |
| Keywords | react, react-hooks |

## Links

- npm: https://www.npmjs.com/package/origen
- Repository: https://github.com/haefele-software/origen
- Homepage: https://github.com/haefele-software/origen#readme
- Issues: https://github.com/haefele-software/origen/issues
- npm.io page: https://npm.io/package/origen

## Dependencies (1)

- [react](https://npm.io/package/react.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.6 (latest) — 2021-04-20
- 0.0.5 — 2021-04-20
- 0.0.4 — 2021-04-20
- 0.0.3 — 2021-04-20
- 0.0.2 — 2021-04-20
- 0.0.1 — 2021-04-20

## README

<img src="https://raw.githubusercontent.com/haefele-software/origen/main/assets/origen-header.png">

# ORIGEN

 [![npm](https://img.shields.io/npm/v/origen.svg)](https://www.npmjs.com/package/origen)  [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/haefele-software/origen/blob/main/LICENSE) <a href="https://bundlephobia.com/result?p=origen@latest" target="\_parent">
  <img alt="" src="https://badgen.net/bundlephobia/minzip/origen@latest" />
</a>

A zero dependency, React utility library, filled with useful hooks to make your React experience even better.

#### `useBoolValue`

> For maintaining the value of a boolean and being able to toggle it's value between `true` and `false`;

```js
import { useBoolValue } from 'origen';

export default function App() {
  const [value, toggleValue] = useBoolValue(false);

  return (
    <div>
      <h1>My value is: {value}</h1>
      <button onClick={toggleValue}>Toggle</button>
    </div>
  );
}
```

---

#### `useMousePosition`

> For getting the current `x` and `y` coordinates of the mouse cursor.
```js
import { useMousePosition } from 'origen';

export default function App() {
  const mousePosition = useMousePosition();

  return (
    <div>
      <h1>Width: {mousePosition.x}</h1>
      <h1>Height: {mousePosition.y}</h1>   
    </div>
  );
}
```

---

#### `useWindowDimensions`

> For getting the current `width` and `height` values of the window.

```js
import { useWindowDimensions } from 'origen';

export default function App() {
  const dimensions = useWindowDimensions();

  return (
    <div>
      <h1>Width: {dimensions.width}</h1>
      <h1>Height: {dimensions.height}</h1>      
    </div>
  );
}
```

## License

ORIGEN is [MIT licensed](./LICENSE).

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