states function

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

function states<S>(client: ViewClient<S>, options?: StatesOptions): Stream.Stream<S>;

The client's current state, then each accepted state. States are snapshots, so a slow consumer skips to the latest one. A state re-read after an unusable change or a reconnect arrives as an ordinary state; the stream does not fail. It never ends on its own: interrupt it, or close the scope that connected the client.