Function: composePlayState()
API / @xmachines/play-actor / composePlayState
function composePlayState(authoredState, slice): Record<string, unknown> | undefined;Defined in: packages/play-actor/src/context-projection.ts:228
Composes the effective state of a view: the authored spec.state and the
/context slice.
When the authored state declares the reserved key already, the function skips the projection, the authored state wins, and the code writes a warning in development. No spec that exists now therefore fails.
Parameters
| Parameter | Type | Description |
|---|---|---|
authoredState | Record<string, unknown> | undefined | The raw meta.view.state value. It can be anything, and the caller or toAtomState cleans it. |
slice | Record<string, unknown> | undefined | The context of the machine, as one complete value. |
Returns
Record<string, unknown> | undefined