# @cooperbuckingham/one-pass-global-state

> Personal use typescript global react hook based state

Latest version **1.0.1** (published 2024-03-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cooperbuckingham/one-pass-global-state
pnpm add @cooperbuckingham/one-pass-global-state
yarn add @cooperbuckingham/one-pass-global-state
bun add @cooperbuckingham/one-pass-global-state
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2024-03-18 |
| First published | 2021-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 20.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Cooper Buckingham |
| Maintainers | cooperbuckingham |

## Links

- npm: https://www.npmjs.com/package/@cooperbuckingham/one-pass-global-state
- npm.io page: https://npm.io/package/@cooperbuckingham/one-pass-global-state

## Dependencies (3)

- [@cooperbuckingham/uuid](https://npm.io/package/@cooperbuckingham/uuid.md) ^1.0.1
- [@cooperbuckingham/hooks](https://npm.io/package/@cooperbuckingham/hooks.md) ^0.1.25-alpha.0
- [@cooperbuckingham/collections](https://npm.io/package/@cooperbuckingham/collections.md) ^0.1.10-alpha.0

## Recent versions

- 1.0.1 (latest) — 2024-03-18
- 0.1.25-alpha.0 — 2022-06-22
- 0.1.24-alpha.0 — 2021-07-28
- 0.1.23-alpha.0 — 2021-07-07
- 0.1.22-alpha.0 — 2021-07-07
- 0.1.21-alpha.0 — 2021-07-07
- 0.1.19-alpha.0 — 2021-04-13
- 0.1.18-alpha.0 — 2021-04-09
- 0.1.17-alpha.0 — 2021-04-08
- 0.1.16-alpha.0 — 2021-04-08
- 0.1.15-alpha.0 — 2021-04-08
- 0.1.14-alpha.0 — 2021-04-08
- 0.1.13-alpha.0 — 2021-04-08
- 0.1.12-alpha.0 — 2021-04-08
- 0.1.11-alpha.0 — 2021-04-08
- … 7 more at https://npm.io/package/@cooperbuckingham/one-pass-global-state/versions

## README

# Simple Global State

### Restrictive, typed, access to global state via hook and single key, for react

### How to use
- Call `CbSimpleGlobalState.init(<initial global state>)` to get the singleton instance of CbSimpleGlobalState;
- use the useGlobalState hooks on the singleton to access global state
- use the useLocalState hooks to handle local state

### Note on Restrictions
- To keep things simple and strongly typed, to focus on developer ease of use, there are only 7 tiers of nested
  typed global state.

---
_Source: https://npm.io/package/@cooperbuckingham/one-pass-global-state · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
