useBridgeConnection function

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

function useBridgeConnection(options?: BridgeConnectionOptions): BridgeConnectionHandle;

Follows the page's connection to its .NET host (connecting, connected, reconnecting, lost or closed) as a shallow ref through onBridgeConnection, until the current effect scope is disposed. Call it in setup() or effectScope().run(): outside an effect scope it is never released (development builds warn).

const { state: connection } = useBridgeConnection();
<p v-if="connection === 'lost'" role="alert">The application stopped responding.</p>