Structural paths
Reach declared state through typed refs or stable path strings such as users/42/profile/name.
A type-safe state engine for Octane and React built around structural paths, targeted subscriptions, and atomic commits.
const score = s.rows.at('beta').scorestore.observe(score, render)store.update(score, n => n + 1)rows/alpha/scorerows/beta/scorerows/gamma/scoreimport { createStore, segment } from 'segment-state';
const store = createStore({
todos: segment({ title: '', completed: false }),
});
const completed = store.state.todos.at('docs').completed;
store.observe(completed, () => console.log(store.get(completed)));
store.set(completed, true, 'todo/complete');A ref identifies state without exposing a mutable object. The same address can be observed by a component, written inside a transaction, serialized for hydration, or matched by an external port.

The benchmark suite prioritizes deterministic counts—callbacks woken, selector runs, and bookkeeping retained after churn—then measures write, memory, and mount costs in isolated processes. Timing and heap results are machine-specific.
The getting-started guide builds a store from plain values, shows how refs and transactions work, and introduces keyed segments. Continue with the state model or go directly to the advanced guide for resources, SSR, ports, and lifecycle guarantees. When you want to interact with the model first, open the browser playground.