Skip to content

0.11.0

Compare
Choose a tag to compare

Features

Improvements

  • Improved rendering performance of useParticipantIds and useParticipantProperty: previously both hooks subscribed to all participant objects stored in the recoil state. This led to a lot of unexpected render cycles, e.g. useParticipantIds({ filter: 'remote' }) would re-render when the local participant toggled their cam or mic. We've restructured the way we store and subscribe to changes in participant objects to achieve only targeted re-renders. Every instance of useParticipantIds now sets up its own local state of returned ids, and only updates the state when the resulting array of ids doesn't match the previously stored one. To keep the connection to the recoil state store, we're now using the useRecoilTransactionObserver_UNSTABLE hook which worked flawlessly in our internal tests. Please be aware that with this change we've introduced at least 1 additional render cycle per useParticipantIds to initialize the state.