function useBridgeConnection(options?: BridgeConnectionOptions): BridgeConnectionHandle; Follows the connection of the component's Runic instance (the page's, by default) to its .NET host (connecting, connected, reconnecting, lost or closed) through onBridgeConnection while its owner lives. state holds the current state at once; the subscription starts with the owner's effects, so server rendering never observes. Call during component initialization (or in $effect.root); owner destruction unsubscribes.
const connection = useBridgeConnection();
{#if connection.state === "lost"}<p role="alert">The application stopped responding.</p>{/if}