Closed mccow002 closed 3 years ago
Well, I wanted something to be handle global reconnection. But now I created an options
object with a hubName
props. if provided, it will filter inside the effect and it will only apply reconnection on the hub you choosed.
About the reconnection even when the hub was stopped. I never thought about that, I also added a takeUntil
like you suggested.
You will see the v8.3.0 really soon. Tell me if you need anything.
Currently, if you're using the createReconnectEffect helper method to handle disconnect events, you cannot stop the hub. Sending the stop event will stop the hub, but then the disconnect action will trigger this effect and reconnect.
The createReconnectEffect is also not hub specific. If you set if up for one hub, it will try to reconnect any hub that get disconnected, whether it's disconnected intentionally or not.
Proposed fix: Add the hub parameter to the createReconnectEffect helper method, and add the following to the createReconnectEffect effect: