4 ms·
> but this kind of bug exists because it’s using React Native Considering how this issue was from a package that isn't included with React Native, this seems l
by mikewhy 6y ago
> but this kind of bug exists because it’s using React Native
Considering how this issue was from a package that isn't included with React Native, this seems like a bit of a stretch.
- kennywinker 6y agothe native way of doing this on iOS would be `SCNetworkReachability` which is part of the built-in SystemConfiguration framework. That call requires the endpoint to check as an input - thus prompting the developer to think about if they are contacting an unnecessary third party. So while this isn't really the specific fault of react native, it does seem to me to be the fault of a non-native framework that encourages developers to use higher level abstractions rather than system frameworks.
- mikewhy 6y agoThe library in question did use that function, but without something set up at the endpoint, it's not very useful: > A remote host is considered reachable when a data packet, sent by an application into the network stack, can leave the local device. Reachability does not guarantee that the data packet will actually be received by the host. https://developer.apple.com/documentation/systemconfiguration/scnetworkreachability-g7d https://developer.apple.com/documentation/systemconfiguratio... More details in this issue: https://github.com/react-native-community/react-native-netinfo/issues/307 https://github.com/react-native-community/react-native-netin...