Skip to content

StateWriter

A claimed state namespace, returned by StateClient.publish. The single writer pushes whole snapshots with StateWriter.set; the shell stamps a monotonic rev and fans each out to the other reader frames of this app.

S = unknown

close(): void;

Relinquish ownership; the namespace’s snapshot is released once no frame still holds it.

void


onRevoked(handler): () => void;

Fires if a later publish of the same namespace displaces this writer (its sets then no-op); returns an unsubscribe.

() => void

() => void


set(next): void;

Publish a new whole snapshot to this app’s reader frames. A no-op after this writer is revoked.

S

void