ViewControllerState interface

Module @runic-artifex/views in @runic-artifex/views 0.23.0

interface ViewControllerState<TClient extends ViewClient>

One consistent reading of a ViewController. A new object is published for every change.

Properties

source

readonly source: ViewSource<TClient>;

The source this state belongs to.

client

readonly client: TClient | undefined;

The connected or observed client, or undefined until it connects.

state

readonly state: TClient["snapshot"] | undefined;

The latest state, or undefined until the client connects. While the same source connects again, after retry() or once a released client's grace period ended, it stays the last state the controller showed, with pending.

error

readonly error: unknown;

The connection failure, if any.

pending

readonly pending: boolean;

True while a connector is connecting.