# diegohaz/constate

React Context + State

Repository: https://github.com/diegohaz/constate
Canonical: https://ross.abutalabs.com/products/constate
Homepage: https://github.com/diegohaz/constate
Language: TypeScript
License: MIT
License Family: permissive
Topics: react, react-context, react-state, state-management, constate, reactjs, reakit, react-hooks, hooks
Last push: 2026-08-26T18:50:03+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 54, longevity 100
- inputs: {"age_days": 3078, "days_push": 7, "days_rel": 98, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4005, forks 94 (observed 2026-08-28T04:08:32.170435+00:00)

## What it is
Constate is a tiny React library that lets you write state with custom hooks and lift them into React Context with minimal effort. It wraps any hook with a factory that generates a provider and context hooks, scaling local state to global state.

## Use cases
- share state between React components without prop drilling
- turn a custom hook into a React Context provider
- scale local component state to global state
- manage theming or i18n state in React apps
- build wizard or form state with React Context

## When to choose
- you use React hooks and want Context-based state with minimal boilerplate
- you want a tiny, unopinionated state management library
- you want to start with local state and lift it to Context later

## When to avoid
- you need a full-featured store with middleware, devtools, or selectors
- you are not using React
- you need high-frequency state updates where Context re-renders are costly

## Facets
- artifact type: library
- maturity: stable
- function: state-management
- domain: frontend, web-development
- platform: browser, cross-platform
- tags: react, react-context, react-hooks, typescript, nodejs

## Member repositories
- diegohaz/constate (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:32.170435+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-29T18:24:04.852265+00:00, confidence not recorded.
  - readme: https://github.com/diegohaz/constate (fetched 2026-08-28T04:08:32.170435+00:00, sha 4ba3d144c585)
  - homepage: https://github.com/diegohaz/constate (fetched 2026-08-29T09:17:20.673215+00:00, sha cf5db1b05547)
  - registry_npm: https://registry.npmjs.org/constate (fetched 2026-08-29T09:17:20.676172+00:00, sha 3010c92ccd9c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
