Show connection status and try to reconnect automatically
Reconnection algorithm should use exponential backoff.
Also try to reconnect when window regains visibility: https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilitychange_event
Reconnection algorithm should use exponential backoff.
Also try to reconnect when window regains visibility: https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilitychange_event