LiveKit LogoDocs
Real-timeEgress/IngressCloudReference

useConnectionState

The useConnectionState hook allows you to simply implement your own ConnectionState component.

Import

import { useConnectionState } from '@livekit/components-react';

Usage

const connectionState = useConnectionState(room);

Parameters

#
room?Room

Returns

import('livekit-client').ConnectionState;

On this page

ImportUsageParametersReturns

Previous

Chevron IconuseConnectionQualityIndicator
LiveKit Logo

Product

SFU

SDKs

Cloud Dashboard

Cloud Status

GitHub Logo