You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which holds a local state of subcriptions. However, we already have the React.ref to store such subs. And, components does not need to re-render if the list of subscriptions update as its sub's result will update the component anyway.
My thought now is that we just need to use React.ref:
Looks like it makes sense. Could this be related to the performance issues Max observes in #526? The React 18 release notes talk about batched rendering changes for improved performance, but maybe the way we're tracking these subscriptions actually degrades performance with React's changes?
Right! It seemed to improve the experience of the UI when I updated this useSub. But I can't tell if its the root issue as the recording tables still appear quite slow (i.e. top corner checkbox appears checked then unchecked on first load -> its intermediate states are shown).
tthvo
changed the title
Update useSubscriptions hook to reduce re-rendering
[Task] Update useSubscriptions hook to reduce re-rendering
Sep 30, 2022
Right now, we define useSubscriptions:
which holds a local state of subcriptions. However, we already have the
React.ref
to store such subs. And, components does not need to re-render if the list of subscriptions update as its sub's result will update the component anyway.My thought now is that we just need to use
React.ref
:The text was updated successfully, but these errors were encountered: