Skip to content

Commit

Permalink
Fix state update on participant attributes hook (#957)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasIO authored Sep 11, 2024
1 parent 0e5ef94 commit 7ef2dd9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/lovely-rocks-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@livekit/components-react": patch
---

Fix state update on participant attributes hook
4 changes: 2 additions & 2 deletions packages/react/src/hooks/useParticipantAttributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ export function useParticipantAttributes(props: UseParticipantAttributesOptions
() => (p ? participantAttributesObserver(p) : participantAttributesObserver(p)),
[p],
);
const { attributes } = useObservableState(attributeObserver, {
const attributeState = useObservableState(attributeObserver, {
attributes: p?.attributes,
});

return { attributes };
return attributeState;
}

/**
Expand Down

0 comments on commit 7ef2dd9

Please sign in to comment.