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.
The text was updated successfully, but these errors were encountered:
I don't quite understand how to make a contribution - I'm getting 403 status error when I'm trying to push a new branch. Should I fork the repo? Other than that, the obvious solution would be to add [] to useEffect dependencies.
useSubscription
doesn't work -useMemo
creates the subscription during the first render, but thenuseEffect
unsubscribes after the component has mounted(there are no deps inuseEffect
call). Also I thinkuseMemo
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 usinguseEffect
both for the subscription effect and the cleanup.The text was updated successfully, but these errors were encountered: