Hiyve Components - v1.0.0
    Preparing search index...

    Interface ConnectionState

    Connection state for the Hiyve client.

    Tracks the WebSocket connection to the signaling server. Use isConnecting to show a loading indicator during initial connection, and error to display connection failure messages.

    Connection status indicator:

    function ConnectionStatus() {
    const { isConnected, isConnecting, error } = useConnection();

    if (isConnecting) return <ActivityIndicator />;
    if (error) return <Text style={styles.error}>{error}</Text>;
    if (!isConnected) return <Text>Disconnected</Text>;
    return <Text>Connected</Text>;
    }
    interface ConnectionState {
        error: string | null;
        isConnected: boolean;
        isConnecting: boolean;
    }
    Index

    Properties

    error: string | null

    Error message if connection failed, null otherwise

    isConnected: boolean

    Whether currently connected to the signaling server

    isConnecting: boolean

    Whether a connection attempt is in progress