connectionStates function

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

function connectionStates(options?: BridgeConnectionOptions): Stream.Stream<BridgeConnectionState>;

The page's connection to its .NET host: the current BridgeConnectionState (connecting, connected, reconnecting, lost or closed), then each change, as onBridgeConnection from @runic-artifex/views reports it. A slow consumer skips to the latest state. It never ends on its own; interrupting it unsubscribes.

yield* Effect.forkScoped(Stream.runForEach(connectionStates(), state => Effect.log(`Bridge ${state}`)));