HubContextValue

interface
devtools-ui/src/types.ts:148

Hub connection context value provided to consumers.

This is the shape of the value exposed by HubContext and consumed via useHubConnection. It contains methods for sending messages, subscribing to incoming messages, and controlling the connection lifecycle.

Properties

NameTypeDescription
disconnect() => voidManually disconnect from the hub and cancel auto-reconnect.
extensionIdstringThis panel's identity, as given to the hub at handshake.
reconnect() => voidReset reconnect attempts and establish a fresh connection.
send(message: DevtoolsMessage) => voidSend a protocol message to the hub.
statusHubConnectionStatusCurrent connection status.
subscribe(handler: (message: DevtoolsMessage) => void) => () => voidSubscribe to incoming hub messages.