Closed mpnri closed 1 month ago
Latest commit: ae6bd2c5ac34c2e92a4183b7998570a917168a63
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Looks good, thanks!
Hi, This PR fixes the problem of not re-rendering in
useRemoteParticipant
for triggered participant events.Currently, this hook uses
useObservableState
, which itself uses auseState
to execute a re-render after each emit value in theobservable
. But we know that the reference of participant object does not change when new events are fired, and thus re-rendering does not occur. So, to solve this problem, we need to put the participant in a wrapper object to useuseState
.P.S: Maybe a cleaner coding to solve this problem: (although it requires the 'map' operator from rxjs)