diff --git a/Examples/UIExplorer/NetInfoExample.js b/Examples/UIExplorer/NetInfoExample.js index af120c59115..a79ed67e204 100644 --- a/Examples/UIExplorer/NetInfoExample.js +++ b/Examples/UIExplorer/NetInfoExample.js @@ -176,7 +176,7 @@ exports.examples = [ { platform: 'android', title: 'NetInfo.isConnectionExpensive (Android)', - description: 'Asycnronously check isConnectionExpensive', + description: 'Asynchronously check isConnectionExpensive', render(): ReactElement { return ; } }, ]; diff --git a/Libraries/Network/NetInfo.js b/Libraries/Network/NetInfo.js index d4295754f25..fff16c59860 100644 --- a/Libraries/Network/NetInfo.js +++ b/Libraries/Network/NetInfo.js @@ -58,11 +58,15 @@ const _subscriptions = new Map(); let _isConnected; if (Platform.OS === 'ios') { - _isConnected = (reachability: ReachabilityStateIOS): bool => { + _isConnected = function( + reachability: ReachabilityStateIOS, + ): bool { return reachability !== 'none' && reachability !== 'unknown'; }; } else if (Platform.OS === 'android') { - _isConnected = (connectionType: ConnectivityStateAndroid) : bool => { + _isConnected = function( + connectionType: ConnectivityStateAndroid, + ): bool { return connectionType !== 'NONE' && connectionType !== 'UNKNOWN'; }; }