Hook to get mood state for a specific user.
The user ID to get mood state for
The mood state or undefined if not available
Convenience hook that returns just the mood state for a single user. Useful when you only need one participant's mood data.
function ParticipantTile({ userId }: { userId: string }) { const moodState = useMoodState(userId); return ( <div> {moodState && ( <span>Mood: {moodState.emotion}</span> )} </div> );} Copy
function ParticipantTile({ userId }: { userId: string }) { const moodState = useMoodState(userId); return ( <div> {moodState && ( <span>Mood: {moodState.emotion}</span> )} </div> );}
Hook to get mood state for a specific user.