Use `isInternetReachable` instead of `isConnected` in the online manager example
The isConnected property actually only conveys that the network connection has been established (e.g. Wi-Fi connection), which not necessarily implies that there is a working internet connection.
So I as wondering if it is not better to use isInternetReachable instead? Although I am aware (and thus a bit hesitant as well) that the netinfo library implements this through a HEAD request to a Google URL.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| query | ⬜️ Ignored (Inspect) | Visit Preview | Apr 19, 2024 7:17am |
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
I guess it depends on what you want. I don't know react native much and this guide was contributed by someone else. If you say isInternetReachable is better, we can change it. There are some open issues about it though:
- https://github.com/react-native-netinfo/react-native-netinfo/issues/615
- https://github.com/react-native-netinfo/react-native-netinfo/issues/572
closing as stale