Skip to main content

useIsConnected

Returns a promise that resolves when transport is connected. Resolves immediately if already connected.

moopsyClient.
transport.
useIsConnected
()
⚛ React Hook (Function)
()
Arguments
None
=>
Returns
boolean

Usage

const isConnected = moopsyClient.transport.useIsConnected();

if(isConnected !== true) {
return <div>Connecting...</div>;
}