Interface: ViewSessionSnapshot<TActor>
API / @xmachines/play-view / index / ViewSessionSnapshot
Defined in: packages/play-view/src/view-session.ts:44
The result of the last resolution. A new resolution makes a new object.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TActor extends ViewActor | ViewActor | The type of the actor of the provider. |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
actor | readonly | TActor | The actor whose view this is. Between a new actor prop and its setInputs(), the snapshot still shows the view of the old actor. A provider that can render in that gap, such as play-react, whose session takes the prop in a layout effect, hands this actor to its descendants, so that the actor and the view agree. | packages/play-view/src/view-session.ts:51 |
failure | readonly | | { error: unknown; } | null | The failure of this resolution, or null. | packages/play-view/src/view-session.ts:65 |
generation | readonly | number | The generation of the store, from the lifecycle. A provider keys its subtree on it: a new generation is a new store, and the subtree builds again. | packages/play-view/src/view-session.ts:63 |
store | readonly | StateStore | null | The store of the view, with the guard of /context. It is null for a gap and for a failed resolution. | packages/play-view/src/view-session.ts:58 |
view | readonly | PlaySpec | null | The view that the actor held at the resolution, or null for a gap. | packages/play-view/src/view-session.ts:53 |