cpunion/react-native-actioncable

reconnect when app is in background

Opened this issue · 2 comments

Hi,

Sometimes the socket connection disconnects when the application is in the background. How do I get it to reconnect when the application is opened?

Thank you.

I think maybe you can try AppState to listen if App is foreground or not and try to reconnect when App back to action https://facebook.github.io/react-native/docs/appstate

I thought that too. But how can I reconnect? I mean, i need something like ActionCable.reconnect() isn't it?