# getify/TNG-Hooks

Provides React-inspired 'hooks' like useState(..) for stand-alone functions

Repository: https://github.com/getify/TNG-Hooks
Canonical: https://ross.abutalabs.com/products/tng-hooks
Language: JavaScript
License: MIT
License Family: permissive
Topics: state, react, hooks
Archived: true
Last push: 2022-08-27T15:41:11+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2849, "days_push": 1467, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1008, forks 33 (observed 2026-08-28T04:03:12.570283+00:00)

## What it is
TNG-Hooks is a small JavaScript library that brings React-inspired hooks like useState, useReducer, and useEffect to plain, standalone functions, creating 'Articulated Functions' with persistent state and side effects. It works independently of React and supports custom hooks.

## Use cases
- add react-style hooks to plain javascript functions
- manage state in standalone functions without react
- use useState outside of react
- build stateful utility functions with hooks
- share custom hooks logic across non-react code
- model stateful functions for ui rendering without a framework

## When to choose
- you want React-like hooks ergonomics in framework-free JavaScript
- you need lightweight stateful functions without pulling in React
- you want to reuse hook patterns in non-UI code

## When to avoid
- you are building a real React application, where built-in hooks are the better fit
- you need a full state management solution with stores or devtools
- you need a library with frequent updates and active maintenance

## Facets
- artifact type: library
- maturity: maintenance
- function: state-management, developer-tools
- domain: web-development, frontend, developer-tools
- platform: browser
- tags: react-hooks, standalone-functions, stateful-functions, no-framework, nodejs, javascript

## Member repositories
- getify/TNG-Hooks (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:12.570283+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:12:09.312110+00:00, confidence not recorded.
  - readme: https://github.com/getify/TNG-Hooks (fetched 2026-08-28T04:03:12.570283+00:00, sha c245c51b237e)
  - registry_npm: https://registry.npmjs.org/tng-hooks (fetched 2026-08-29T13:12:21.001841+00:00, sha f3032c3d8ad0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
