useParticipantAttribute
The useParticipantAttribute hook returns the latest value of a given attribute key of a participant. It requires a Participant object passed as property in the UseParticipantAttributesOptions or via the ParticipantContext.
Import
import { useParticipantAttribute } from "@livekit/components-react";
Usage
const myAttributeValue = useParticipantAttribute("targetAttributeName");
Properties
Returns
string;