mirror of
https://github.com/status-im/react-native.git
synced 2025-02-10 08:26:23 +00:00
Don't use arrow functions with Flow types to fix website generation
Summary: Our custom jsdocs parser doesn't support the syntax yet. public Reviewed By: bestander Differential Revision: D2739861 fb-gh-sync-id: eefc3c54b98e06597ca7d93396aa4fe3a92d4a58
This commit is contained in:
parent
f9f123ba96
commit
139f9945df
@ -176,7 +176,7 @@ exports.examples = [
|
|||||||
{
|
{
|
||||||
platform: 'android',
|
platform: 'android',
|
||||||
title: 'NetInfo.isConnectionExpensive (Android)',
|
title: 'NetInfo.isConnectionExpensive (Android)',
|
||||||
description: 'Asycnronously check isConnectionExpensive',
|
description: 'Asynchronously check isConnectionExpensive',
|
||||||
render(): ReactElement { return <IsConnectionExpensive />; }
|
render(): ReactElement { return <IsConnectionExpensive />; }
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -58,11 +58,15 @@ const _subscriptions = new Map();
|
|||||||
|
|
||||||
let _isConnected;
|
let _isConnected;
|
||||||
if (Platform.OS === 'ios') {
|
if (Platform.OS === 'ios') {
|
||||||
_isConnected = (reachability: ReachabilityStateIOS): bool => {
|
_isConnected = function(
|
||||||
|
reachability: ReachabilityStateIOS,
|
||||||
|
): bool {
|
||||||
return reachability !== 'none' && reachability !== 'unknown';
|
return reachability !== 'none' && reachability !== 'unknown';
|
||||||
};
|
};
|
||||||
} else if (Platform.OS === 'android') {
|
} else if (Platform.OS === 'android') {
|
||||||
_isConnected = (connectionType: ConnectivityStateAndroid) : bool => {
|
_isConnected = function(
|
||||||
|
connectionType: ConnectivityStateAndroid,
|
||||||
|
): bool {
|
||||||
return connectionType !== 'NONE' && connectionType !== 'UNKNOWN';
|
return connectionType !== 'NONE' && connectionType !== 'UNKNOWN';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user