useBridgeConnection function

Module @runic-artifex/react in @runic-artifex/react 0.23.0

function useBridgeConnection(options?: BridgeConnectionOptions): BridgeConnectionHandle;

Renders the page's connection to its .NET host (connecting, connected, reconnecting, lost or closed) while the component is mounted, through onBridgeConnection. A changed lostAfter subscribes again. The server snapshot is connecting.

const connection = useBridgeConnection();
{connection.state === "lost" && <p role="alert">The application stopped responding.</p>}