useRemoteParticipants
The useRemoteParticipants
hook returns all remote participants (without the local) of the current room.
Import
import { useRemoteParticipants } from "@livekit/components-react";
Remarks
To optimize performance, you can use the updateOnlyOn
property to decide on what RoomEvents
the hook updates.
Usage
const participants = useRemoteParticipants();<ParticipantLoop participants={participants}><ParticipantName /></ParticipantLoop>;
Properties
options?
UseRemoteParticipantsOptions
Returns
RemoteParticipant[]