Open thoughtworks-tcaceres opened 2 months ago
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.
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