Skip to content

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 ParameterDefault typeDescription
TActor extends ViewActorViewActorThe type of the actor of the provider.

Properties

PropertyModifierTypeDescriptionDefined in
actorreadonlyTActorThe 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
failurereadonly| { error: unknown; } | nullThe failure of this resolution, or null.packages/play-view/src/view-session.ts:65
generationreadonlynumberThe 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
storereadonlyStateStore | nullThe 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
viewreadonlyPlaySpec | nullThe view that the actor held at the resolution, or null for a gap.packages/play-view/src/view-session.ts:53