Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels