Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use isInternetReachable instead of isConnected in the online manager example #7303

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

Conversation

bitcrumb
Copy link

@bitcrumb bitcrumb commented Apr 19, 2024

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.

Copy link

vercel bot commented Apr 19, 2024

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

Copy link

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.

@TkDodo
Copy link
Collaborator

TkDodo commented Apr 21, 2024

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants