dx-platform
dx-platform copied to clipboard
useSubscription unsubscribes after the first render
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.
any progress here?
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.