Hiyve Components - v1.0.0
    Preparing search index...

    Function useParticipant

    • 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.

      Parameters

      • userId: string

        The user ID of the participant to retrieve

      Returns Participant | undefined

      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>;
      }