react-native-actioncable
react-native-actioncable copied to clipboard
reconnect when app is in background
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?