A context object stores data that belongs to an entire state-machine flow rather than to one state or transition. Transitions manipulate it through actions, allowing business data and workflow state to move together. section 8.7
Use context when data must survive or support multiple states:
- Keep shared collections such as a list of things in context. section 8.7.1
- Store cross-state selection such as the current thing, then update or reset it through transitions. section 8.7.1
List and current selection
A machine can initialize context with { things: [], currentThing: null }. An ADD event appends a thing, SEE records its id as currentThing, and SEE_ALL resets the selection. A detail-view hook reads the selected item from context, while a list-view hook reads an item by id; each hook sends only the events valid for its state.

