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

retrieve network connectivity as well instead of just internet access #383

Open
thoughtworks-tcaceres opened this issue Sep 19, 2024 · 1 comment

Comments

@thoughtworks-tcaceres
Copy link

General question:

Current Behavior

The isConnected looks at internet access, which is great, but there is delay due to having to wait for constant pings.
There is no current way to determine if there is network connectivity (similar to netInfo library) (ignoring the internet access).

Expected Behavior

Be able to modify isConnected to look at network connectivity instead of internet access.
The netInfo library has the ability to see if the internet is reachable, or if it has network activity - would be nice if this library could provide either both of these fields, or if we could modify the isConnected value.

Your Environment

software version
react-native-offline 6.0.2
react-native 0.73.6
node 20.12.1
npm or yarn 1.22.22
@thoughtworks-tcaceres
Copy link
Author

tl;dr
https://github.com/react-native-netinfo/react-native-netinfo --> gives ability to see isConnected and isInternetReachable
this library only provides one value in redux store / hook which is isConnected which looks at internet access.
This unfortunately could provide delays in UI (understandable) since we need to wait for pings to determine if isConnected should be true or false.

If we only looked at network connectivity we'd get closer to real time update as we don't need to wait for the pings.
Asking if it's possible to either modify the definition of isConnected in the app if we care more about network connectivity and not internet access, or if this is something that is not possible.

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

No branches or pull requests

1 participant