-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is this hooks automatically disconnect channels? #40
Comments
Thanks for letting me know. Do you have a codesandbox that reproduces this? |
@201524547 It was something i had reported time ago, it disconnects and never re-connects back to the channel if the component re-renders |
Please provide a codesandbox - I do not have this issue. |
Sure i'll do that but i think i found why its probably happening, let me explain it quickly |
Hey, why don’t you move the useChannel hook higher up into a provider? That way it can live connected for the duration of the session. |
At some point if my event uses that channel somehow its unsubscribing, i tried that but i can check again |
Might #43 solve this too? |
yeah, I ran into the same problem and (as far as I can tell), #43 would solve this perfectly. |
useChannel hooks automatically disconnect channels?
i use this hooks, i wonder useChannel hook automatically disconnect when component unmount?
The text was updated successfully, but these errors were encountered: