Access a single participant by user ID.
Returns the participant object for the given user ID, or undefined if no participant with that ID exists in the room.
The user ID of the participant to retrieve
The participant object, or undefined if not found
import { useParticipant } from '@hiyve/rn-react';function ParticipantName({ userId }: { userId: string }) { const participant = useParticipant(userId); if (!participant) return null; return <Text>{participant.displayName}</Text>;} Copy
import { useParticipant } from '@hiyve/rn-react';function ParticipantName({ userId }: { userId: string }) { const participant = useParticipant(userId); if (!participant) return null; return <Text>{participant.displayName}</Text>;}
Access a single participant by user ID.
Returns the participant object for the given user ID, or undefined if no participant with that ID exists in the room.