diff --git a/Examples/UIExplorer/AccessibilityIOSExample.js b/Examples/UIExplorer/AccessibilityIOSExample.js index 8f8329f5e..ca5628d6e 100644 --- a/Examples/UIExplorer/AccessibilityIOSExample.js +++ b/Examples/UIExplorer/AccessibilityIOSExample.js @@ -61,6 +61,6 @@ exports.description = 'Interface to show iOS\' accessibility samples'; exports.examples = [ { title: 'Accessibility elements', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, ]; diff --git a/Examples/UIExplorer/ActionSheetIOSExample.js b/Examples/UIExplorer/ActionSheetIOSExample.js index 044268214..4be6c7760 100644 --- a/Examples/UIExplorer/ActionSheetIOSExample.js +++ b/Examples/UIExplorer/ActionSheetIOSExample.js @@ -198,27 +198,27 @@ exports.description = 'Interface to show iOS\' action sheets'; exports.examples = [ { title: 'Show Action Sheet', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Show Action Sheet with tinted buttons', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Show Share Action Sheet', - render(): ReactElement { + render(): ReactElement { return ; } }, { title: 'Share Local Image', - render(): ReactElement { + render(): ReactElement { return ; } }, { title: 'Share Screenshot', - render(): ReactElement { + render(): ReactElement { return ; } } diff --git a/Examples/UIExplorer/ActivityIndicatorIOSExample.js b/Examples/UIExplorer/ActivityIndicatorIOSExample.js index 6923936d4..967f04275 100644 --- a/Examples/UIExplorer/ActivityIndicatorIOSExample.js +++ b/Examples/UIExplorer/ActivityIndicatorIOSExample.js @@ -142,7 +142,7 @@ exports.examples = [ }, { title: 'Start/stop', - render: function(): ReactElement { + render: function(): ReactElement { return ; } }, diff --git a/Examples/UIExplorer/AdSupportIOSExample.js b/Examples/UIExplorer/AdSupportIOSExample.js index dab5e88fb..7a98fb1dc 100644 --- a/Examples/UIExplorer/AdSupportIOSExample.js +++ b/Examples/UIExplorer/AdSupportIOSExample.js @@ -31,7 +31,7 @@ exports.description = 'Example of using the ad support API.'; exports.examples = [ { title: 'Ad Support IOS', - render: function(): ReactElement { + render: function(): ReactElement { return ; }, } diff --git a/Examples/UIExplorer/AlertIOSExample.js b/Examples/UIExplorer/AlertIOSExample.js index 112149e16..85d66d4a6 100644 --- a/Examples/UIExplorer/AlertIOSExample.js +++ b/Examples/UIExplorer/AlertIOSExample.js @@ -38,7 +38,7 @@ exports.examples = [{ }, { title: 'Prompt Options', - render(): ReactElement { + render(): ReactElement { return ; } }, diff --git a/Examples/UIExplorer/AnimatedGratuitousApp/AnExApp.js b/Examples/UIExplorer/AnimatedGratuitousApp/AnExApp.js index a6c161d97..58af5045a 100644 --- a/Examples/UIExplorer/AnimatedGratuitousApp/AnExApp.js +++ b/Examples/UIExplorer/AnimatedGratuitousApp/AnExApp.js @@ -82,7 +82,7 @@ class Circle extends React.Component { }); } - render(): ReactElement { + render(): ReactElement { if (this.state.panResponder) { var handlers = this.state.panResponder.panHandlers; var dragStyle = { // Used to position while dragging @@ -183,7 +183,7 @@ class AnExApp extends React.Component { this._onMove = this._onMove.bind(this); } - render(): ReactElement { + render(): ReactElement { var circles = this.state.keys.map((key, idx) => { if (key === this.state.activeKey) { return ; diff --git a/Examples/UIExplorer/AnimatedGratuitousApp/AnExBobble.js b/Examples/UIExplorer/AnimatedGratuitousApp/AnExBobble.js index 574e1a2b7..ebf26f013 100644 --- a/Examples/UIExplorer/AnimatedGratuitousApp/AnExBobble.js +++ b/Examples/UIExplorer/AnimatedGratuitousApp/AnExBobble.js @@ -89,7 +89,7 @@ class AnExBobble extends React.Component { }); } - render(): ReactElement { + render(): ReactElement { return ( {this.state.bobbles.map((_, i) => { diff --git a/Examples/UIExplorer/AnimatedGratuitousApp/AnExSet.js b/Examples/UIExplorer/AnimatedGratuitousApp/AnExSet.js index d67931387..1df1f084c 100644 --- a/Examples/UIExplorer/AnimatedGratuitousApp/AnExSet.js +++ b/Examples/UIExplorer/AnimatedGratuitousApp/AnExSet.js @@ -45,7 +45,7 @@ class AnExSet extends React.Component { openColor: randColor(), }; } - render(): ReactElement { + render(): ReactElement { var backgroundColor = this.props.openVal ? this.props.openVal.interpolate({ inputRange: [0, 1], diff --git a/Examples/UIExplorer/AnimatedGratuitousApp/AnExTilt.js b/Examples/UIExplorer/AnimatedGratuitousApp/AnExTilt.js index 8eb97844b..31c23c3bc 100644 --- a/Examples/UIExplorer/AnimatedGratuitousApp/AnExTilt.js +++ b/Examples/UIExplorer/AnimatedGratuitousApp/AnExTilt.js @@ -90,7 +90,7 @@ class AnExTilt extends React.Component { this._startBurnsZoom(); } - render(): ReactElement { + render(): ReactElement { return ( ; } + render(): ReactElement { return ; } }, { title: 'Previous states:', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, ]; diff --git a/Examples/UIExplorer/AppStateIOSExample.js b/Examples/UIExplorer/AppStateIOSExample.js index 10aaed8aa..7598df7fb 100644 --- a/Examples/UIExplorer/AppStateIOSExample.js +++ b/Examples/UIExplorer/AppStateIOSExample.js @@ -85,15 +85,15 @@ exports.examples = [ { title: 'Subscribed AppStateIOS:', description: 'This changes according to the current state, so you can only ever see it rendered as "active"', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Previous states:', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Memory Warnings', description: 'In the simulator, hit Shift+Command+M to simulate a memory warning.', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, ]; diff --git a/Examples/UIExplorer/AsyncStorageExample.js b/Examples/UIExplorer/AsyncStorageExample.js index f2ee7da47..ac8bd7889 100644 --- a/Examples/UIExplorer/AsyncStorageExample.js +++ b/Examples/UIExplorer/AsyncStorageExample.js @@ -115,6 +115,6 @@ exports.description = 'Asynchronous local disk storage.'; exports.examples = [ { title: 'Basics - getItem, setItem, removeItem', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, ]; diff --git a/Examples/UIExplorer/CameraRollExample.js b/Examples/UIExplorer/CameraRollExample.js index 9716e6b80..f39b78f39 100644 --- a/Examples/UIExplorer/CameraRollExample.js +++ b/Examples/UIExplorer/CameraRollExample.js @@ -137,6 +137,6 @@ exports.description = 'Example component that uses CameraRoll to list user\'s ph exports.examples = [ { title: 'Photos', - render(): ReactElement { return ; } + render(): ReactElement { return ; } } ]; diff --git a/Examples/UIExplorer/DatePickerIOSExample.js b/Examples/UIExplorer/DatePickerIOSExample.js index 412f2af33..a3dd7876c 100644 --- a/Examples/UIExplorer/DatePickerIOSExample.js +++ b/Examples/UIExplorer/DatePickerIOSExample.js @@ -132,7 +132,7 @@ exports.description = 'Select dates and times using the native UIDatePicker.'; exports.examples = [ { title: '', - render: function(): ReactElement { + render: function(): ReactElement { return ; }, }]; diff --git a/Examples/UIExplorer/GeolocationExample.js b/Examples/UIExplorer/GeolocationExample.js index 98177f437..230127d66 100644 --- a/Examples/UIExplorer/GeolocationExample.js +++ b/Examples/UIExplorer/GeolocationExample.js @@ -32,7 +32,7 @@ exports.description = 'Examples of using the Geolocation API.'; exports.examples = [ { title: 'navigator.geolocation', - render: function(): ReactElement { + render: function(): ReactElement { return ; }, } diff --git a/Examples/UIExplorer/LayoutAnimationExample.js b/Examples/UIExplorer/LayoutAnimationExample.js index f2ac7b350..ee2038dbf 100644 --- a/Examples/UIExplorer/LayoutAnimationExample.js +++ b/Examples/UIExplorer/LayoutAnimationExample.js @@ -160,12 +160,12 @@ exports.title = 'Layout Animation'; exports.description = 'Layout animation'; exports.examples = [{ title: 'Add and remove views', - render(): ReactElement { + render(): ReactElement { return ; }, }, { title: 'Cross fade views', - render(): ReactElement { + render(): ReactElement { return ; }, }]; diff --git a/Examples/UIExplorer/LayoutEventsExample.js b/Examples/UIExplorer/LayoutEventsExample.js index ab663c0cb..832519484 100644 --- a/Examples/UIExplorer/LayoutEventsExample.js +++ b/Examples/UIExplorer/LayoutEventsExample.js @@ -158,7 +158,7 @@ exports.description = 'Examples that show how Layout events can be used to ' + exports.examples = [ { title: 'LayoutEventExample', - render: function(): ReactElement { + render: function(): ReactElement { return ; }, }]; diff --git a/Examples/UIExplorer/ListViewPagingExample.js b/Examples/UIExplorer/ListViewPagingExample.js index 103ad9589..4d31db208 100644 --- a/Examples/UIExplorer/ListViewPagingExample.js +++ b/Examples/UIExplorer/ListViewPagingExample.js @@ -131,7 +131,7 @@ var ListViewPagingExample = React.createClass({ }; }, - renderRow: function(rowData: string, sectionID: string, rowID: string): ReactElement { + renderRow: function(rowData: string, sectionID: string, rowID: string): ReactElement { return (); }, diff --git a/Examples/UIExplorer/NavigationExperimental/NavigationCompositionExample.js b/Examples/UIExplorer/NavigationExperimental/NavigationCompositionExample.js index 898806b68..261e8060d 100644 --- a/Examples/UIExplorer/NavigationExperimental/NavigationCompositionExample.js +++ b/Examples/UIExplorer/NavigationExperimental/NavigationCompositionExample.js @@ -282,7 +282,7 @@ class ExampleMainView extends React.Component { ); } - _renderScene(): ReactElement { + _renderScene(): ReactElement { const {navigationState} = this.props; const childState = navigationState.routes[navigationState.index]; return ( diff --git a/Examples/UIExplorer/NetInfoExample.js b/Examples/UIExplorer/NetInfoExample.js index b07f086bf..e64886ea5 100644 --- a/Examples/UIExplorer/NetInfoExample.js +++ b/Examples/UIExplorer/NetInfoExample.js @@ -162,22 +162,22 @@ exports.examples = [ { title: 'NetInfo.isConnected', description: 'Asynchronously load and observe connectivity', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'NetInfo.update', description: 'Asynchronously load and observe connectionInfo', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'NetInfo.updateHistory', description: 'Observed updates to connectionInfo', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { platform: 'android', title: 'NetInfo.isConnectionExpensive (Android)', description: 'Asynchronously check isConnectionExpensive', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, ]; diff --git a/Examples/UIExplorer/PickerIOSExample.js b/Examples/UIExplorer/PickerIOSExample.js index 4550759d0..553013538 100644 --- a/Examples/UIExplorer/PickerIOSExample.js +++ b/Examples/UIExplorer/PickerIOSExample.js @@ -144,13 +144,13 @@ exports.description = 'Render lists of selectable options with UIPickerView.'; exports.examples = [ { title: '', - render: function(): ReactElement { + render: function(): ReactElement { return ; }, }, { title: ' with custom styling', - render: function(): ReactElement { + render: function(): ReactElement { return ; }, }]; diff --git a/Examples/UIExplorer/PushNotificationIOSExample.js b/Examples/UIExplorer/PushNotificationIOSExample.js index 8553f1f79..ee137d83a 100644 --- a/Examples/UIExplorer/PushNotificationIOSExample.js +++ b/Examples/UIExplorer/PushNotificationIOSExample.js @@ -162,7 +162,7 @@ exports.description = 'Apple PushNotification and badge value'; exports.examples = [ { title: 'Badge Number', - render(): ReactElement { + render(): ReactElement { PushNotificationIOS.requestPermissions(); return ( @@ -181,13 +181,13 @@ exports.examples = [ }, { title: 'Push Notifications', - render(): ReactElement { + render(): ReactElement { return ; } }, { title: 'Notifications Permissions', - render(): ReactElement { + render(): ReactElement { return ; } }]; diff --git a/Examples/UIExplorer/RCTRootViewIOSExample.js b/Examples/UIExplorer/RCTRootViewIOSExample.js index e7942d2f9..349b022d9 100644 --- a/Examples/UIExplorer/RCTRootViewIOSExample.js +++ b/Examples/UIExplorer/RCTRootViewIOSExample.js @@ -83,7 +83,7 @@ exports.description = 'Examples that show useful methods when embedding React Na exports.examples = [ { title: 'Updating app properties in runtime', - render(): ReactElement { + render(): ReactElement { return ( ); @@ -91,7 +91,7 @@ exports.examples = [ }, { title: 'RCTRootView\'s size flexibility', - render(): ReactElement { + render(): ReactElement { return ( ); diff --git a/Examples/UIExplorer/SegmentedControlIOSExample.js b/Examples/UIExplorer/SegmentedControlIOSExample.js index b76fcb4a8..bdac8e9e4 100644 --- a/Examples/UIExplorer/SegmentedControlIOSExample.js +++ b/Examples/UIExplorer/SegmentedControlIOSExample.js @@ -145,26 +145,26 @@ exports.description = 'Native segmented control'; exports.examples = [ { title: 'Segmented controls can have values', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Segmented controls can have a pre-selected value', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Segmented controls can be momentary', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Segmented controls can be disabled', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Custom colors can be provided', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Change events can be detected', - render(): ReactElement { return ; } + render(): ReactElement { return ; } } ]; diff --git a/Examples/UIExplorer/SliderExample.js b/Examples/UIExplorer/SliderExample.js index 15fa62464..a987671b5 100644 --- a/Examples/UIExplorer/SliderExample.js +++ b/Examples/UIExplorer/SliderExample.js @@ -94,19 +94,19 @@ exports.description = 'Slider input for numeric values'; exports.examples = [ { title: 'Default settings', - render(): ReactElement { + render(): ReactElement { return ; } }, { title: 'Initial value: 0.5', - render(): ReactElement { + render(): ReactElement { return ; } }, { title: 'minimumValue: -1, maximumValue: 2', - render(): ReactElement { + render(): ReactElement { return ( { return ; } }, { title: 'onSlidingComplete', - render(): ReactElement { + render(): ReactElement { return ( ); @@ -132,7 +132,7 @@ exports.examples = [ { title: 'Custom min/max track tint color', platform: 'ios', - render(): ReactElement { + render(): ReactElement { return ( { return ; } }, { title: 'Custom track image', platform: 'ios', - render(): ReactElement { + render(): ReactElement { return ; } }, { title: 'Custom min/max track image', platform: 'ios', - render(): ReactElement { + render(): ReactElement { return ( { return ; } }, { title: 'minimumValue: -1, maximumValue: 2', - render(): ReactElement { + render(): ReactElement { return ( { return ; } }, { title: 'Custom min/max track tint color', - render(): ReactElement { + render(): ReactElement { return ( { return ; } }, { title: 'Custom track image', - render(): ReactElement { + render(): ReactElement { return ; } }, { title: 'Custom min/max track image', - render(): ReactElement { + render(): ReactElement { return ( ; } + render(): ReactElement { return ; } }, ]; diff --git a/Examples/UIExplorer/SwitchExample.js b/Examples/UIExplorer/SwitchExample.js index 19cf72596..dc4d1e391 100644 --- a/Examples/UIExplorer/SwitchExample.js +++ b/Examples/UIExplorer/SwitchExample.js @@ -130,26 +130,26 @@ var EventSwitchExample = React.createClass({ var examples = [ { title: 'Switches can be set to true or false', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Switches can be disabled', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Change events can be detected', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Switches are controlled components', - render(): ReactElement { return ; } + render(): ReactElement { return ; } } ]; if (Platform.OS === 'ios') { examples.push({ title: 'Custom colors can be provided', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }); } diff --git a/Examples/UIExplorer/TextExample.ios.js b/Examples/UIExplorer/TextExample.ios.js index 41839fff3..8c7b4ff86 100644 --- a/Examples/UIExplorer/TextExample.ios.js +++ b/Examples/UIExplorer/TextExample.ios.js @@ -351,7 +351,7 @@ exports.examples = [ }, }, { title: 'Toggling Attributes', - render: function(): ReactElement { + render: function(): ReactElement { return ; }, }, { diff --git a/Examples/UIExplorer/TextInputExample.ios.js b/Examples/UIExplorer/TextInputExample.ios.js index fdf4daca1..1f2e83d2e 100644 --- a/Examples/UIExplorer/TextInputExample.ios.js +++ b/Examples/UIExplorer/TextInputExample.ios.js @@ -532,7 +532,7 @@ exports.examples = [ }, { title: 'Event handling', - render: function(): ReactElement { return ; }, + render: function(): ReactElement { return ; }, }, { title: 'Colored input text', @@ -630,7 +630,7 @@ exports.examples = [ }, { title: 'Blur on submit', - render: function(): ReactElement { return ; }, + render: function(): ReactElement { return ; }, }, { title: 'Multiline blur on submit', diff --git a/Examples/UIExplorer/TimerExample.js b/Examples/UIExplorer/TimerExample.js index b2a39b749..8fdc92081 100644 --- a/Examples/UIExplorer/TimerExample.js +++ b/Examples/UIExplorer/TimerExample.js @@ -149,7 +149,7 @@ exports.examples = [ title: 'this.setInterval(fn, t)', description: 'Execute function fn every t milliseconds until cancelled ' + 'or component is unmounted.', - render: function(): ReactElement { + render: function(): ReactElement { var IntervalExample = React.createClass({ getInitialState: function() { return { diff --git a/Examples/UIExplorer/TouchableExample.js b/Examples/UIExplorer/TouchableExample.js index 5e7243c8d..a78d27e00 100644 --- a/Examples/UIExplorer/TouchableExample.js +++ b/Examples/UIExplorer/TouchableExample.js @@ -71,14 +71,14 @@ exports.examples = [ }, }, { title: ' with highlight', - render: function(): ReactElement { + render: function(): ReactElement { return ; }, }, { title: 'Touchable feedback events', description: ' components accept onPress, onPressIn, ' + 'onPressOut, and onLongPress as props.', - render: function(): ReactElement { + render: function(): ReactElement { return ; }, }, { @@ -86,13 +86,13 @@ exports.examples = [ description: ' components also accept delayPressIn, ' + 'delayPressOut, and delayLongPress as props. These props impact the ' + 'timing of feedback events.', - render: function(): ReactElement { + render: function(): ReactElement { return ; }, }, { title: '3D Touch / Force Touch', description: 'iPhone 6s and 6s plus support 3D touch, which adds a force property to touches', - render: function(): ReactElement { + render: function(): ReactElement { return ; }, platform: 'ios', @@ -100,14 +100,14 @@ exports.examples = [ title: 'Touchable Hit Slop', description: ' components accept hitSlop prop which extends the touch area ' + 'without changing the view bounds.', - render: function(): ReactElement { + render: function(): ReactElement { return ; }, }, { title: 'Disabled Touchable*', description: ' components accept disabled prop which prevents ' + 'any interaction with component', - render: function(): ReactElement { + render: function(): ReactElement { return ; }, }]; diff --git a/Examples/UIExplorer/TransformExample.js b/Examples/UIExplorer/TransformExample.js index 3ce782b1c..c85cac0fd 100644 --- a/Examples/UIExplorer/TransformExample.js +++ b/Examples/UIExplorer/TransformExample.js @@ -208,7 +208,7 @@ exports.examples = [ { title: 'Perspective', description: 'perspective: 850, rotateX: Animated.timing(0 -> 360)', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Translate, Rotate, Scale', diff --git a/Examples/UIExplorer/TransparentHitTestExample.js b/Examples/UIExplorer/TransparentHitTestExample.js index ac9431944..b049c94bb 100644 --- a/Examples/UIExplorer/TransparentHitTestExample.js +++ b/Examples/UIExplorer/TransparentHitTestExample.js @@ -46,6 +46,6 @@ exports.description = 'Transparent view receiving touch events'; exports.examples = [ { title: 'TransparentHitTestExample', - render(): ReactElement { return ; } + render(): ReactElement { return ; } } ]; diff --git a/Examples/UIExplorer/UIExplorerApp.ios.js b/Examples/UIExplorer/UIExplorerApp.ios.js index 760a96043..1e05c795c 100644 --- a/Examples/UIExplorer/UIExplorerApp.ios.js +++ b/Examples/UIExplorer/UIExplorerApp.ios.js @@ -140,7 +140,7 @@ class UIExplorerApp extends React.Component { ); } - _renderOverlay(props: NavigationSceneRendererProps): ReactElement { + _renderOverlay(props: NavigationSceneRendererProps): ReactElement { return ( { return ( {UIExplorerStateTitleMap(props.scene.route)} @@ -157,7 +157,7 @@ class UIExplorerApp extends React.Component { ); } - _renderScene(props: NavigationSceneRendererProps): ?ReactElement { + _renderScene(props: NavigationSceneRendererProps): ?ReactElement { const state = props.scene.route; if (state.key === 'AppList') { return ( diff --git a/Examples/UIExplorer/UIExplorerExampleList.js b/Examples/UIExplorer/UIExplorerExampleList.js index f9cb279d6..e0331bde9 100644 --- a/Examples/UIExplorer/UIExplorerExampleList.js +++ b/Examples/UIExplorer/UIExplorerExampleList.js @@ -62,7 +62,7 @@ class UIExplorerExampleList extends React.Component { example; } - render(): ?ReactElement { + render(): ?ReactElement { const filterText = this.props.filter || ''; const filterRegex = new RegExp(String(filterText), 'i'); const filter = (example) => filterRegex.test(example.module.title); @@ -88,7 +88,7 @@ class UIExplorerExampleList extends React.Component { ); } - _renderTitleRow(): ?ReactElement { + _renderTitleRow(): ?ReactElement { if (!this.props.displayTitleRow) { return null; } @@ -104,7 +104,7 @@ class UIExplorerExampleList extends React.Component { ); } - _renderTextInput(): ?ReactElement { + _renderTextInput(): ?ReactElement { if (this.props.disableSearch) { return null; } @@ -126,7 +126,7 @@ class UIExplorerExampleList extends React.Component { ); } - _renderSectionHeader(data: any, section: string): ?ReactElement { + _renderSectionHeader(data: any, section: string): ?ReactElement { return ( {section.toUpperCase()} @@ -134,7 +134,7 @@ class UIExplorerExampleList extends React.Component { ); } - _renderExampleRow(example: {key: string, module: Object}): ?ReactElement { + _renderExampleRow(example: {key: string, module: Object}): ?ReactElement { return this._renderRow( example.module.title, example.module.description, @@ -143,7 +143,7 @@ class UIExplorerExampleList extends React.Component { ); } - _renderRow(title: string, description: string, key: ?string, handler: ?Function): ?ReactElement { + _renderRow(title: string, description: string, key: ?string, handler: ?Function): ?ReactElement { return ( diff --git a/Examples/UIExplorer/WebSocketExample.js b/Examples/UIExplorer/WebSocketExample.js index 4439d29ff..c43079162 100644 --- a/Examples/UIExplorer/WebSocketExample.js +++ b/Examples/UIExplorer/WebSocketExample.js @@ -43,7 +43,7 @@ const WS_STATES = [ ]; class Button extends React.Component { - render(): ReactElement { + render(): ReactElement { const label = {this.props.label}; if (this.props.disabled) { return ( @@ -63,7 +63,7 @@ class Button extends React.Component { } class Row extends React.Component { - render(): ReactElement { + render(): ReactElement { return ( {this.props.label} @@ -162,7 +162,7 @@ class WebSocketExample extends React.Component { this.setState({outgoingMessage: ''}); }; - render(): ReactElement { + render(): ReactElement { const socketState = WS_STATES[this.state.socketState || -1]; const canConnect = !this.state.socket || diff --git a/Examples/UIExplorer/WebViewExample.js b/Examples/UIExplorer/WebViewExample.js index 9c3020ef4..9e58ae67c 100644 --- a/Examples/UIExplorer/WebViewExample.js +++ b/Examples/UIExplorer/WebViewExample.js @@ -336,15 +336,15 @@ exports.description = 'Base component to display web content'; exports.examples = [ { title: 'Simple Browser', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Scale Page to Fit', - render(): ReactElement { return ; } + render(): ReactElement { return ; } }, { title: 'Bundled HTML', - render(): ReactElement { + render(): ReactElement { return ( { return ( { return ( this.shouldReject = true); }, - async testShouldSucceedAsync() : Promise { + async testShouldSucceedAsync() : Promise { try { await TestModule.shouldResolve(); this.shouldSucceedAsync = true; @@ -56,7 +56,7 @@ var PromiseTest = React.createClass({ } }, - async testShouldThrowAsync() : Promise { + async testShouldThrowAsync() : Promise { try { await TestModule.shouldReject(); this.shouldThrowAsync = false; @@ -65,7 +65,7 @@ var PromiseTest = React.createClass({ } }, - render() : ReactElement { + render() : ReactElement { return ; } diff --git a/Libraries/Components/StaticRenderer.js b/Libraries/Components/StaticRenderer.js index 8f6cabde5..03a7d8d08 100644 --- a/Libraries/Components/StaticRenderer.js +++ b/Libraries/Components/StaticRenderer.js @@ -23,7 +23,7 @@ var StaticRenderer = React.createClass({ return nextProps.shouldUpdate; }, - render: function(): ReactElement { + render: function(): ReactElement { return this.props.render(); }, }); diff --git a/Libraries/Components/StatusBar/StatusBar.js b/Libraries/Components/StatusBar/StatusBar.js index 3a7bb1a93..e49f7c930 100644 --- a/Libraries/Components/StatusBar/StatusBar.js +++ b/Libraries/Components/StatusBar/StatusBar.js @@ -321,7 +321,7 @@ const StatusBar = React.createClass({ }); }, - render(): ?ReactElement { + render(): ?ReactElement { return null; }, }); diff --git a/Libraries/Components/Touchable/TouchableBounce.js b/Libraries/Components/Touchable/TouchableBounce.js index c06cbd7d9..72eee1e18 100644 --- a/Libraries/Components/Touchable/TouchableBounce.js +++ b/Libraries/Components/Touchable/TouchableBounce.js @@ -125,7 +125,7 @@ var TouchableBounce = React.createClass({ return 0; }, - render: function(): ReactElement { + render: function(): ReactElement { return ( { // Note(avik): remove dynamic typecast once Flow has been upgraded const child = onlyChild(this.props.children); let children = child.props.children; diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js b/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js index d405a7fd0..b4b6aa8ce 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js @@ -79,7 +79,7 @@ class SceneView extends React.Component { ); } - render(): ?ReactElement { + render(): ?ReactElement { return this.props.sceneRenderer(this.props.sceneRendererProps); } } @@ -107,7 +107,7 @@ class NavigationCard extends React.Component { ); } - render(): ReactElement { + render(): ReactElement { const { panHandlers, pointerEvents, @@ -156,13 +156,9 @@ const styles = StyleSheet.create({ NavigationCard = NavigationPointerEventsContainer.create(NavigationCard); -// $FlowFixMe: Figure out how to declare these properties on the container class NavigationCard.CardStackPanResponder = NavigationCardStackPanResponder; -// $FlowFixMe NavigationCard.CardStackStyleInterpolator = NavigationCardStackStyleInterpolator; -// $FlowFixMe NavigationCard.PagerPanResponder = NavigationPagerPanResponder; -// $FlowFixMe NavigationCard.PagerStyleInterpolator = NavigationPagerStyleInterpolator; module.exports = NavigationCard; diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationCardStack.js b/Libraries/CustomComponents/NavigationExperimental/NavigationCardStack.js index 1dc535cdd..28abd0a4a 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationCardStack.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationCardStack.js @@ -116,7 +116,7 @@ class NavigationCardStack extends React.Component { ); } - render(): ReactElement { + render(): ReactElement { return ( { ); } - _renderScene(props: NavigationSceneRendererProps): ReactElement { + _renderScene(props: NavigationSceneRendererProps): ReactElement { const isVertical = this.props.direction === 'vertical'; const style = isVertical ? diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js b/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js index 172b14fc2..0140f3b50 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js @@ -119,7 +119,7 @@ class NavigationHeader extends React.Component { ); } - render(): ReactElement { + render(): ReactElement { const { scenes, style, viewProps } = this.props; const scenesProps = scenes.map(scene => { @@ -137,7 +137,7 @@ class NavigationHeader extends React.Component { ); } - _renderLeft(props: NavigationSceneRendererProps): ?ReactElement { + _renderLeft(props: NavigationSceneRendererProps): ?ReactElement { return this._renderSubView( props, 'left', @@ -146,7 +146,7 @@ class NavigationHeader extends React.Component { ); } - _renderTitle(props: NavigationSceneRendererProps): ?ReactElement { + _renderTitle(props: NavigationSceneRendererProps): ?ReactElement { return this._renderSubView( props, 'title', @@ -155,7 +155,7 @@ class NavigationHeader extends React.Component { ); } - _renderRight(props: NavigationSceneRendererProps): ?ReactElement { + _renderRight(props: NavigationSceneRendererProps): ?ReactElement { return this._renderSubView( props, 'right', @@ -169,7 +169,7 @@ class NavigationHeader extends React.Component { name: SubViewName, renderer: NavigationSceneRenderer, styleInterpolator: NavigationStyleInterpolator, - ): ?ReactElement { + ): ?ReactElement { const { scene, navigationState, diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderTitle.js b/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderTitle.js index 1f4e14b5d..4ee95e0ae 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderTitle.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderTitle.js @@ -38,7 +38,7 @@ const { } = ReactNative; type Props = { - children: ReactElement; + children: ReactElement; style: any; textStyle: any; viewProps: any; diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationPointerEventsContainer.js b/Libraries/CustomComponents/NavigationExperimental/NavigationPointerEventsContainer.js index f0826473b..e581b9300 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationPointerEventsContainer.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationPointerEventsContainer.js @@ -52,7 +52,7 @@ const MIN_POSITION_OFFSET = 0.01; */ function create( Component: ReactClass, -): ReactClass { +): ReactClass { class Container extends React.Component { @@ -86,7 +86,7 @@ function create( this._bindPosition(nextProps); } - render(): ReactElement { + render(): ReactElement { this._pointerEvents = this._computePointerEvents(); return ( { }).done(); } - render(): ?ReactElement { + render(): ?ReactElement { if (this._rendered || // Make sure that once we render once, we stay rendered even if incrementalGroupEnabled gets flipped. !this.context.incrementalGroupEnabled || this.state.doIncrementalRender) { diff --git a/Libraries/Experimental/IncrementalExample.js b/Libraries/Experimental/IncrementalExample.js index 1fb3cebc2..a2b917668 100644 --- a/Libraries/Experimental/IncrementalExample.js +++ b/Libraries/Experimental/IncrementalExample.js @@ -124,7 +124,7 @@ class IncrementalExample extends React.Component { console.log('onDone:', stats); }, 0); } - render(): ReactElement { + render(): ReactElement { return ( { return ( { return ( { const slideoutView = this.props.renderQuickActions(rowData, sectionID, rowID); // If renderRowSlideout is unspecified or returns falsey, don't allow swipe diff --git a/Libraries/Experimental/SwipeableRow/SwipeableQuickActionButton.js b/Libraries/Experimental/SwipeableRow/SwipeableQuickActionButton.js index 9f472729c..de7f27ea2 100644 --- a/Libraries/Experimental/SwipeableRow/SwipeableQuickActionButton.js +++ b/Libraries/Experimental/SwipeableRow/SwipeableQuickActionButton.js @@ -43,7 +43,7 @@ const SwipeableQuickActionButton = React.createClass({ textStyle: Text.propTypes.style, }, - render(): ?ReactElement { + render(): ?ReactElement { if (!this.props.imageSource && !this.props.text) { return null; } diff --git a/Libraries/Experimental/SwipeableRow/SwipeableQuickActions.js b/Libraries/Experimental/SwipeableRow/SwipeableQuickActions.js index b7c09747a..13e97ab5c 100644 --- a/Libraries/Experimental/SwipeableRow/SwipeableQuickActions.js +++ b/Libraries/Experimental/SwipeableRow/SwipeableQuickActions.js @@ -34,7 +34,7 @@ const SwipeableQuickActions = React.createClass({ style: View.propTypes.style, }, - render(): ReactElement { + render(): ReactElement { const children = this.props.children; let buttons = []; diff --git a/Libraries/Experimental/SwipeableRow/SwipeableRow.js b/Libraries/Experimental/SwipeableRow/SwipeableRow.js index f0def1ac3..ee71fa040 100644 --- a/Libraries/Experimental/SwipeableRow/SwipeableRow.js +++ b/Libraries/Experimental/SwipeableRow/SwipeableRow.js @@ -115,7 +115,7 @@ const SwipeableRow = React.createClass({ } }, - render(): ReactElement { + render(): ReactElement { // The view hidden behind the main view let slideOutView; if (this.state.isSwipeableViewRendered) { diff --git a/Libraries/Experimental/WindowedListView.js b/Libraries/Experimental/WindowedListView.js index 1721e5fb3..3e077414d 100644 --- a/Libraries/Experimental/WindowedListView.js +++ b/Libraries/Experimental/WindowedListView.js @@ -91,15 +91,15 @@ type Props = { */ renderRow: ( rowData: any, sectionIdx: number, rowIdx: number, rowKey: string - ) => ?ReactElement; + ) => ?ReactElement; /** * Rendered when the list is scrolled faster than rows can be rendered. */ - renderWindowBoundaryIndicator?: () => ?ReactElement; + renderWindowBoundaryIndicator?: () => ?ReactElement; /** * Always rendered at the bottom of all the rows. */ - renderFooter?: () => ?ReactElement; + renderFooter?: () => ?ReactElement; /** * Pipes through normal onScroll events from the underlying `ScrollView`. */ @@ -139,7 +139,7 @@ type Props = { * A function that returns the scrollable component in which the list rows * are rendered. Defaults to returning a ScrollView with the given props. */ - renderScrollComponent: (props: ?Object) => ReactElement; + renderScrollComponent: (props: ?Object) => ReactElement; /** * Use to disable incremental rendering when not wanted, e.g. to speed up initial render. */ @@ -430,7 +430,7 @@ class WindowedListView extends React.Component { this._firstVisible = newFirstVisible; this._lastVisible = newLastVisible; } - render(): ReactElement { + render(): ReactElement { const {firstRow, lastRow} = this.state; const rowFrames = this._rowFrames; const rows = []; @@ -574,7 +574,7 @@ type CellProps = { */ renderRow: ( rowData: mixed, sectionIdx: number, rowIdx: number, rowKey: string - ) => ?ReactElement; + ) => ?ReactElement; /** * Index of the row, passed through to other callbacks. */ diff --git a/Libraries/Interaction/InteractionManager.js b/Libraries/Interaction/InteractionManager.js index 421e88208..6d3646850 100644 --- a/Libraries/Interaction/InteractionManager.js +++ b/Libraries/Interaction/InteractionManager.js @@ -86,7 +86,7 @@ var InteractionManager = { /** * Schedule a function to run after all interactions have completed. */ - runAfterInteractions(task: ?Task): Promise { + runAfterInteractions(task: ?Task): Promise { return new Promise(resolve => { _scheduleUpdate(); if (task) { diff --git a/Libraries/Interaction/TaskQueue.js b/Libraries/Interaction/TaskQueue.js index 3b6b15839..5d1d1160b 100644 --- a/Libraries/Interaction/TaskQueue.js +++ b/Libraries/Interaction/TaskQueue.js @@ -19,7 +19,7 @@ type SimpleTask = { }; type PromiseTask = { name: string; - gen: () => Promise; + gen: () => Promise; }; export type Task = Function | SimpleTask | PromiseTask; diff --git a/Libraries/Modal/Modal.js b/Libraries/Modal/Modal.js index 87b76fe14..30b5954d0 100644 --- a/Libraries/Modal/Modal.js +++ b/Libraries/Modal/Modal.js @@ -52,7 +52,7 @@ class Modal extends React.Component { visible: true, }; - render(): ?ReactElement { + render(): ?ReactElement { if (this.props.visible === false) { return null; } diff --git a/Libraries/NavigationExperimental/NavigationAnimatedView.js b/Libraries/NavigationExperimental/NavigationAnimatedView.js index 366161295..830ab066b 100644 --- a/Libraries/NavigationExperimental/NavigationAnimatedView.js +++ b/Libraries/NavigationExperimental/NavigationAnimatedView.js @@ -160,7 +160,7 @@ class NavigationAnimatedView } } - render(): ReactElement { + render(): ReactElement { const overlay = this._renderOverlay(); const scenes = this._renderScenes(); return ( @@ -175,11 +175,11 @@ class NavigationAnimatedView ); } - _renderScenes(): Array { + _renderScenes(): Array> { return this.state.scenes.map(this._renderScene, this); } - _renderScene(scene: NavigationScene): ?ReactElement { + _renderScene(scene: NavigationScene): ?ReactElement { const { navigationState, onNavigate, @@ -203,7 +203,7 @@ class NavigationAnimatedView }); } - _renderOverlay(): ?ReactElement { + _renderOverlay(): ?ReactElement { if (this.props.renderOverlay) { const { navigationState, diff --git a/Libraries/NavigationExperimental/NavigationTransitioner.js b/Libraries/NavigationExperimental/NavigationTransitioner.js index 65d573c1a..f319fe55b 100644 --- a/Libraries/NavigationExperimental/NavigationTransitioner.js +++ b/Libraries/NavigationExperimental/NavigationTransitioner.js @@ -162,7 +162,7 @@ class NavigationTransitioner extends React.Component { Animated.parallel(animations).start(this._onTransitionEnd); } - render(): ReactElement { + render(): ReactElement { const overlay = this._renderOverlay(); const scenes = this._renderScenes(); return ( @@ -177,11 +177,11 @@ class NavigationTransitioner extends React.Component { ); } - _renderScenes(): Array { + _renderScenes(): Array> { return this.state.scenes.map(this._renderScene, this); } - _renderScene(scene: NavigationScene): ?ReactElement { + _renderScene(scene: NavigationScene): ?ReactElement { const { navigationState, onNavigate, @@ -205,7 +205,7 @@ class NavigationTransitioner extends React.Component { }); } - _renderOverlay(): ?ReactElement { + _renderOverlay(): ?ReactElement { if (this.props.renderOverlay) { const { navigationState, diff --git a/Libraries/NavigationExperimental/NavigationTypeDefinition.js b/Libraries/NavigationExperimental/NavigationTypeDefinition.js index 638ce3b95..62f0e04b3 100644 --- a/Libraries/NavigationExperimental/NavigationTypeDefinition.js +++ b/Libraries/NavigationExperimental/NavigationTypeDefinition.js @@ -109,7 +109,7 @@ export type NavigationAnimationSetter = ( export type NavigationRenderer = ( navigationState: ?NavigationRoute, onNavigate: NavigationActionCaller, -) => ReactElement; +) => ReactElement; export type NavigationReducer = ( state: ?NavigationRoute, @@ -118,7 +118,7 @@ export type NavigationReducer = ( export type NavigationSceneRenderer = ( props: NavigationSceneRendererProps, -) => ?ReactElement; +) => ?ReactElement; export type NavigationStyleInterpolator = ( props: NavigationSceneRendererProps, diff --git a/Libraries/Network/NetInfo.js b/Libraries/Network/NetInfo.js index 768fb795f..7d4900f8e 100644 --- a/Libraries/Network/NetInfo.js +++ b/Libraries/Network/NetInfo.js @@ -207,7 +207,7 @@ const NetInfo = { * Returns a promise that resolves with one of the connectivity types listed * above. */ - fetch(): Promise { + fetch(): Promise { return RCTNetInfo.getCurrentConnectivity().then(resp => resp.network_info); }, @@ -248,14 +248,14 @@ const NetInfo = { _isConnectedSubscriptions.delete(handler); }, - fetch(): Promise { + fetch(): Promise { return NetInfo.fetch().then( (connection) => _isConnected(connection) ); }, }, - isConnectionExpensive(): Promise { + isConnectionExpensive(): Promise { return deprecatedCallback( Platform.OS === 'android' ? RCTNetInfo.isConnectionMetered() : Promise.reject(new Error('Currently not supported on iOS')), Array.prototype.slice.call(arguments), diff --git a/Libraries/ReactIOS/YellowBox.js b/Libraries/ReactIOS/YellowBox.js index 3aa51d537..777a77758 100644 --- a/Libraries/ReactIOS/YellowBox.js +++ b/Libraries/ReactIOS/YellowBox.js @@ -177,7 +177,7 @@ const WarningInspector = ({ class YellowBox extends React.Component { state: { inspecting: ?string; - warningMap: Map; + warningMap: Map; }; _listener: ?EmitterSubscription; dismissWarning: (warning: ?string) => void; diff --git a/Libraries/Text/Text.js b/Libraries/Text/Text.js index bf313a8cc..4da6d1d52 100644 --- a/Libraries/Text/Text.js +++ b/Libraries/Text/Text.js @@ -144,7 +144,7 @@ const Text = React.createClass({ touchableHandlePress: (null: ?Function), touchableHandleLongPress: (null: ?Function), touchableGetPressRectOffset: (null: ?Function), - render(): ReactElement { + render(): ReactElement { let newProps = this.props; if (this.props.onStartShouldSetResponder || this._hasPressHandler()) { if (!this._handlers) { diff --git a/Libraries/Utilities/UIManager.js b/Libraries/Utilities/UIManager.js index 22d97004a..af12f8ce6 100644 --- a/Libraries/Utilities/UIManager.js +++ b/Libraries/Utilities/UIManager.js @@ -37,7 +37,7 @@ const _takeSnapshot = UIManager.takeSnapshot; * @platform ios */ UIManager.takeSnapshot = async function( - view ?: 'window' | ReactElement | number, + view ?: 'window' | ReactElement | number, options ?: { width ?: number; height ?: number; diff --git a/Libraries/Utilities/deprecatedCallback.js b/Libraries/Utilities/deprecatedCallback.js index 3beefdc48..c1373da2a 100644 --- a/Libraries/Utilities/deprecatedCallback.js +++ b/Libraries/Utilities/deprecatedCallback.js @@ -14,7 +14,7 @@ 'use strict'; -module.exports = function(promise: Promise, callbacks: Array, type: string, warning: string): Promise { +module.exports = function(promise: Promise, callbacks: Array, type: string, warning: string): Promise { if (callbacks.length === 0) { return promise; }