Function useParticipants

  • The useParticipants hook returns all participants (local and remote) of the current room.

    Remarks

    To optimize performance, you can use the updateOnlyOn property to decide on what RoomEvents the hook updates.

    Example

    const participants = useParticipants();
    <ParticipantLoop participants={participants}>
    <ParticipantName />
    </ParticipantLoop>

    Parameters

    Returns (RemoteParticipant | LocalParticipant)[]

Generated using TypeDoc