# Pinna > Pinna — reactive state that’s hard to get wrong. Synchronous state for domain models, built so the usual state bugs cannot happen and the rest fail where you, or your agent, can see them. Pinna is observable state for TypeScript and React, with Effect Schema or without it. Each link points to the Markdown source of a documentation page; the HTML page is at the same URL without `.md` (without `/index.md` for a section page). ## Start - [Start](https://pinna.frondruntime.dev/docs/start/index.md): Read when starting with Pinna. Make a realm, a box, and a computed value, write in an update, show the value in React, and choose between a plain box and a schema box. - [Design principles](https://pinna.frondruntime.dev/docs/start/principles.md): Read when deciding whether Pinna fits, or when one of its rules looks arbitrary. What Pinna is designed for, the mechanism behind each principle, and what each one costs. - [Coming from MobX](https://pinna.frondruntime.dev/docs/start/mobx.md): Read when moving an app from MobX. Find the Pinna call for each MobX one, and the habits that do not carry over. ## Core - [Boxes and computed](https://pinna.frondruntime.dev/docs/state/boxes.md): Read when declaring state. Make a box, derive a cached value from it, make a computed value per argument, and name or compare them. - [Updates](https://pinna.frondruntime.dev/docs/state/updates.md): Read when writing state. Write a box in an update, draft arrays and objects, keep unchanged items across a refetch, rely on an update being undone when it throws, read without subscribing, and hold back the writes of asynchronous work in a stage until it succeeds. - [Collections](https://pinna.frondruntime.dev/docs/state/collections.md): Read when state holds rows by key. Make a keyed collection, add and remove rows, read one row, render one row per key, and write a refetch without rerunning what did not change. - [Reacting](https://pinna.frondruntime.dev/docs/state/reacting.md): Read when code outside React runs because a value changed. Watch a selection, run an autorun with a cleanup, and write from an autorun without a loop. - [Lifecycles](https://pinna.frondruntime.dev/docs/state/lifecycles.md): Read when state comes from outside Pinna. Start a listener when a value gains its first observer and stop it after the last, stand for outside state with an atom, and hold a value observed. ## React - [Hooks](https://pinna.frondruntime.dev/docs/react/hooks.md): Read when showing state in React. Pick between useValue, useValues, and useSelect, read in a handler, give a component its own box, render a model from pinna-effect, and defer a slow render after a write. ## Effect - [Schema-checked boxes](https://pinna.frondruntime.dev/docs/effect/boxes.md): Read when an app already uses Effect. Import the core's calls from pinna-effect, make a box that checks an Effect Schema on every write, and know what a schema adds to a write. - [Classes](https://pinna.frondruntime.dev/docs/effect/classes.md): Read when modeling domain data. Declare a SchemaModel with box fields, derive values on it, write from its methods, decode it from the wire, and hand it the caller's own values, in a decode or an Effect program. - [Collection fields](https://pinna.frondruntime.dev/docs/effect/collections.md): Read when a model holds rows by key. Declare a CollectionField, decode it from a plain array, write a refetch that keeps rows equal under the schema, and reconcile a schema-checked box of an array. - [Equality and hashing](https://pinna.frondruntime.dev/docs/effect/equality.md): Read when a write, a refetch, or a reconcile keeps or replaces a value. Know what each box, collection, and reconcile compares with by default, why two decodes of a model with a box are not equal unless the class defines its own Equal, what Effect's Equal.equals and HashSet see, and how a class defines its own Equal and Hash. - [Programs](https://pinna.frondruntime.dev/docs/effect/programs.md): Read when an app is written as Effect programs. Run an effect per change, stream changes, hold a value observed for a scope, feed a value from a stream, run a feed while its data is read, and hold a section's writes in a stage until it succeeds. ## Guides - [Live data](https://pinna.frondruntime.dev/docs/guides/live-data.md): Read when state comes from a socket or a server. Open a socket while a value is observed and reconnect after a drop, write each message in one update, refetch without losing row identity, and run the same feed as an Effect stream. - [Indexes and sets](https://pinna.frondruntime.dev/docs/guides/row-indexes.md): Read when a value follows a collection a row at a time. Keep a set of keys, the keys of each group, and a sum per group, with collections, boxes, and onRowChange. - [Saving state](https://pinna.frondruntime.dev/docs/guides/saving.md): Read when state outlives a reload. Save a computed projection of what to keep, restore before the watch starts, write a burst of changes once, skip a save that changes nothing, keep a storage error as state, and write a pending save on dispose. - [Testing](https://pinna.frondruntime.dev/docs/guides/testing.md): Read when writing tests. Make a test realm per test, read and write as application code does, record what a select changed to, check what a collection still holds, and test models and programs with Effect. - [Errors and debugging](https://pinna.frondruntime.dev/docs/guides/errors.md): Read when something throws or reruns unexpectedly. Know which errors reach the caller and which go to onError, how a computed value keeps its error, find why a value recomputed with inspect and names, and know the errors Effect adds. ## Reference - [Error messages](https://pinna.frondruntime.dev/docs/reference/errors.md): Read when Pinna throws or logs a message. Every message Pinna and pinna-effect throw or log, what caused it, and the fix. ## Optional - [Full documentation](https://pinna.frondruntime.dev/llms-full.txt): Every page above, concatenated into one file.