MCPcopy Index your code
hub / github.com/avkonst/hookstate

github.com/avkonst/hookstate @v4.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v4.0.1 ↗ · + Follow
255 symbols 804 edges 116 files 5 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Hookstate

The most straightforward, extensible and incredibly fast state management that is based on React state hook.

Why?Docs / SamplesDemo applicationExtensionsRelease notes

Preface

Hookstate is a modern alternative to Redux, Mobx, Recoil, etc. It is simple to learn, easy to use, extensible, very flexible and capable to address all state management needs of large scalable applications. It has got impressive performance and predictable behavior.

Any questions? Just ask by raising a GitHub ticket.

Why Hookstate

hookstate.js.org

Migrating to version 4

hookstate.js.org/docs/migrating-to-v4

Documentation / Code samples / Demo applications

hookstate.js.org/docs/getting-started

Demo application

Development tools

hookstate.js.org/docs/devtools

Plugins / Extensions

hookstate.js.org/docs/extensions-overview

API reference

hookstate.js.org/docs/typedoc-hookstate-core

Hookstate developers workflow

This is the mono repository, which combine the Hookstate core package, extensions, docs and demo applications. pnpm is used as node_modules manager and nx as a scripts launcher. Each package defines its own rules how to build, test, etc.

From the repository root directory:

  • npm install -f pnpm - install pnpm tool
  • pnpm install - install node_modules for all packages

  • pnpm nx <script> <package> - run script for a package as well as build dependencies if required, for example:

  • pnpm nx build core - run build script for core package
  • pnpm nx start todolist - run start script for todolist package as well as build for all dependencies

Extension points exported contracts — how you extend this code

Subscribable (Interface)
(no doc) [4 implementers]
core/src/index.ts
Subscribable (Interface)
(no doc) [2 implementers]
plugins/subscribable/src/subscribable.ts
Serializable (Interface)
(no doc)
plugins/serializable/src/serializable.ts
BroadcastChannelHandle (Interface)
(no doc)
plugins/broadcasted/src/broadcasted.ts
StoreEngine (Interface)
(no doc)
plugins/localstored/src/localstorage.ts
ValidationError (Interface)
(no doc)
plugins/validation/src/validation.ts
Initializable (Interface)
(no doc)
plugins/initializable/src/initializable.ts
Comparable (Interface)
(no doc)
plugins/comparable/src/comparable.ts

Core symbols most depended-on inside this repo

get
called by 566
core/src/index.ts
set
called by 247
core/src/index.ts
useHookstate
called by 205
core/src/index.ts
keys
called by 91
core/src/index.ts
hookstate
called by 36
core/src/index.ts
valid
called by 33
plugins/validation/src/validation.ts
merge
called by 27
core/src/index.ts
modified
called by 25
plugins/snapshotable/src/snapshotable.ts

Shape

Function 132
Method 82
Interface 33
Class 7
Enum 1

Languages

TypeScript100%

Modules by API surface

core/src/index.ts105 symbols
plugins/broadcasted/src/broadcasted.ts16 symbols
plugins/validation/src/validation.ts13 symbols
core/src/__tests__/Extension.tsx10 symbols
plugins/snapshotable/src/snapshotable.ts8 symbols
docs/demos/todolist/src/components/SettingsState.ts7 symbols
docs/demos/strictmode/src/App.tsx7 symbols
plugins/subscribable/src/subscribable.ts6 symbols
docs/index/src/examples/plugin-custom.tsx6 symbols
plugins/devtools/src/devtools.ts5 symbols
docs/index/src/examples/local-complex-tree-structure.tsx5 symbols
plugins/comparable/src/comparable.ts4 symbols

For agents

$ claude mcp add hookstate \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact