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
useSubscription doesn't work - useMemo creates the subscription during the first render, but then useEffect unsubscribes after the component has mounted(there are no deps in useEffect call). Also I think useMemo should not be used for the subscription effect - it can trigger other effects before the initial rendering is complete. I have a case where it messes up some DOM manipulations. The solution would be using useEffect both for the subscription effect and the cleanup.