# beekai-oss/little-state-machine

📠 React custom hook for persist state management

Repository: https://github.com/beekai-oss/little-state-machine
Canonical: https://ross.abutalabs.com/products/little-state-machine
Homepage: https://lrz5wloklm.csb.app/
Language: TypeScript
License: MIT
License Family: permissive
Topics: react, state, flux, state-management, state-machine, react-hooks
Last push: 2025-01-10T22:02:43+00:00

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

## Adoption (not part of the score)
Stars 1539, forks 51 (observed 2026-08-28T04:05:00.340538+00:00)

## What it is
Little State Machine is a tiny (715B gzipped) React hook library for global state management with built-in persistence to sessionStorage or localStorage. It provides a createStore initializer and a useStateMachine hook with actions, selectors, and middleware support.

## Use cases
- manage global state in a react app with a tiny library
- persist react state across page reloads
- share state between components without redux
- build multi-step forms with persisted state
- optimize re-renders with state selectors

## When to choose
- you want a zero-dependency, sub-kilobyte state solution
- you need automatic state persistence in session or local storage
- you prefer a simple flux-style hook API over heavier libraries

## When to avoid
- you need devtools, time-travel debugging, or a large ecosystem
- you require complex async middleware or normalized state graphs
- your project is not React-based

## Facets
- artifact type: library
- maturity: stable
- function: state-management, caching
- domain: frontend, web-development
- platform: -
- tags: react-hooks, flux, state-machine, session-storage, tiny-library, web-server, nodejs

## Member repositories
- beekai-oss/little-state-machine (main) score 34

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:00.340538+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-30T04:30:53.398970+00:00, confidence not recorded.
  - readme: https://github.com/beekai-oss/little-state-machine (fetched 2026-08-28T04:05:00.340538+00:00, sha cadd74bb1cf8)
  - homepage: https://lrz5wloklm.csb.app/ (fetched 2026-08-29T11:32:34.043077+00:00, sha e3f43543e979)
- Data as of 2026-08-30T08:39:29.467469+00:00.
