Open bradley-holt opened 7 years ago
This is really interesting, thanks Bradley!
One thing we have to consider is local development. My computer could be disconnected, but my app would still work as it can connect to the local server. I’m not sure if this is covered by the Network Information API as I haven’t read it yet, just want to mention this for reference
Consider using the Network Information API, if available, to augment the connection status provided by
hoodie-connection-status
. For example, if the Network Information API is available and indicates a connection type ofnone
thenhoodie-connection-status
can skip pinging the URL and immediately indicate that connection status accordingly. If the Network Information API is available and indicates a connection type other thannone
thenhoodie-connection-status
should still attempt to ping the URL and not trust that connectivity is actually available.