useRemoteParticipant
function useRemoteParticipant(identifier, _options?): unknown;Defined in: packages/react/src/hooks/participant/useRemoteParticipant.ts:27
The useRemoteParticipant hook returns the first RemoteParticipant by either identity and/or based on the participant kind.
Parameters
| Parameter | Type |
|---|---|
identifier | unknown |
_options? | UseRemoteParticipantOptions |
Returns
unknown
Example
function AgentParticipant() {
const participant = useRemoteParticipant({ identity: "valora-agent", kind: "agent" });
return participant ? <ParticipantName participant={participant} /> : null;
}