useHubConnection
functionsignature
useHubConnection(): HubContextValueAccess the hub connection context.
Returns
HubContextValue, The hub connection context value (see HubContextValue).
Example
example
import { useHubConnection } from "@yoltra/devtools-ui";
function ConnectionStatus() {
const { status, reconnect } = useHubConnection();
return (
<div>
<span>Status: {status}</span>
<button onClick={reconnect}>Reconnect</button>
</div>
);
}