Fix React Native open source

Reviewed By: hramos, TheSavior

Differential Revision: D5728356

fbshipit-source-id: fb751d67c16ba9273de93d9b6d5acd65b1555dca
This commit is contained in:
Caleb Meredith
2017-08-29 14:54:33 -07:00
committed by Facebook Github Bot
parent 2d0fe109d7
commit 63f990121a
27 changed files with 257 additions and 300 deletions

View File

@@ -11,9 +11,9 @@
*/
'use strict';
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.53 was deployed. To see the error delete this comment and
* run Flow. */
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
import type React from 'react';
export type Example = {

View File

@@ -98,9 +98,9 @@ var NetworkImageCallbackExample = createReactClass({
},
_loadEventFired(event) {
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.53 was deployed. To see the error delete this
* comment and run Flow. */
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
this.setState((state) => {
return state.events = [...state.events, event];
});

View File

@@ -46,10 +46,9 @@ class ExampleBox extends React.Component<$FlowFixMeProps, $FlowFixMeState> {
<View
onTouchEndCapture={this.handleTouchCapture}
onTouchStart={this.flushReactChanges}>
{/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses
* an error when upgrading Flow's support for React. Common errors
* found when upgrading Flow's React support are documented at
* https://fburl.com/eq7bs81w */}
{/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */}
<this.props.Component onLog={this.handleLog} />
</View>
<View

View File

@@ -125,10 +125,9 @@ class RNTesterApp extends React.Component<Props, RNTesterNavigationState> {
return (
<View style={styles.exampleContainer}>
<Header title="RNTester" />
{/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses
* an error when upgrading Flow's support for React. Common errors
* found when upgrading Flow's React support are documented at
* https://fburl.com/eq7bs81w */}
{/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */}
<RNTesterExampleList
onNavigate={this._handleAction}
list={RNTesterList}

View File

@@ -38,10 +38,9 @@ function createContainer<Props: Object, State>(
},
): React.ComponentType<Props> {
return class ComponentWithPersistedState extends React.Component<Props, $FlowFixMeState> {
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
* error when upgrading Flow's support for React. Common errors found when
* upgrading Flow's React support are documented at
* https://fburl.com/eq7bs81w */
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
static displayName = `RNTesterStatePersister(${Component.displayName || Component.name})`;
state = {value: spec.getInitialState(this.props)};
_cacheKey = `RNTester:${spec.version || 'v1'}:${spec.cacheKeySuffix(this.props)}`;

View File

@@ -35,10 +35,9 @@ exports.examples = [
return (
<View>
<ScrollView
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses
* an error when upgrading Flow's support for React. Common errors
* found when upgrading Flow's React support are documented at
* https://fburl.com/eq7bs81w */
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */
ref={(scrollView) => { _scrollView = scrollView; }}
automaticallyAdjustContentInsets={false}
onScroll={() => { console.log('onScroll!'); }}
@@ -77,10 +76,9 @@ exports.examples = [
<View style={addtionalStyles}>
<Text style={styles.text}>{title}</Text>
<ScrollView
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment
* suppresses an error when upgrading Flow's support for React.
* Common errors found when upgrading Flow's React support are
* documented at https://fburl.com/eq7bs81w */
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */
ref={(scrollView) => { _scrollView = scrollView; }}
automaticallyAdjustContentInsets={false}
horizontal={true}