useStatus
Returns a promise that resolves when transport is connected. Resolves immediately if already connected.
()
None
=>
Value of
TransportStatus (Enum)
"initializing" | "connecting" | "connected"
Usage
import { TransportStatus } from '@moopsyjs/react';
const status = moopsyClient.transport.useStatus();
if(status !== TransportStatus.connected) {
return <div>Connecting...</div>;
}