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.
Type Parameters
Section titled “Type Parameters”S = unknown
Methods
Section titled “Methods”close()
Section titled “close()”close(): void;Relinquish ownership; the namespace’s snapshot is released once no frame still holds it.
Returns
Section titled “Returns”void
onRevoked()
Section titled “onRevoked()”onRevoked(handler): () => void;Fires if a later publish of the same namespace displaces this writer (its sets then no-op); returns an unsubscribe.
Parameters
Section titled “Parameters”handler
Section titled “handler”() => void
Returns
Section titled “Returns”() => void
set(next): void;Publish a new whole snapshot to this app’s reader frames. A no-op after this writer is revoked.
Parameters
Section titled “Parameters”S
Returns
Section titled “Returns”void