Reverted commit D4027388

Reviewed By: yungsters

Differential Revision: D4027388

fbshipit-source-id: 8e3341b6f393ccf432c1a4e22a7cbf422284a06f
This commit is contained in:
Konstantin Raev
2016-10-16 04:11:59 -07:00
committed by Facebook Github Bot
parent dbfd046145
commit 6ea26c01de
62 changed files with 136 additions and 136 deletions

View File

@@ -149,7 +149,7 @@ const KeyboardAvoidingView = React.createClass({
this.subscriptions.forEach((sub) => sub.remove());
},
render(): React.Element<*> {
render(): React.Element<any> {
const {behavior, children, style, ...props} = this.props;
switch (behavior) {

View File

@@ -28,7 +28,7 @@ class StaticRenderer extends React.Component {
return nextProps.shouldUpdate;
}
render(): React.Element<*> {
render(): React.Element<any> {
return this.props.render();
}
}

View File

@@ -386,7 +386,7 @@ class StatusBar extends React.Component {
});
};
render(): ?React.Element<*> {
render(): ?React.Element<any> {
return null;
}
}

View File

@@ -131,7 +131,7 @@ var TouchableBounce = React.createClass({
return 0;
},
render: function(): React.Element<*> {
render: function(): React.Element<any> {
return (
<Animated.View
style={[{transform: [{scale: this.state.scale}]}, this.props.style]}

View File

@@ -147,7 +147,7 @@ const TouchableWithoutFeedback = React.createClass({
return this.props.delayPressOut || 0;
},
render: function(): React.Element<*> {
render: function(): React.Element<any> {
// Note(avik): remove dynamic typecast once Flow has been upgraded
const child = React.Children.only(this.props.children);
let children = child.props.children;

View File

@@ -76,7 +76,7 @@ class NavigationCard extends React.Component<any, Props, any> {
style: PropTypes.any,
};
render(): React.Element<*> {
render(): React.Element<any> {
const {
panHandlers,
pointerEvents,

View File

@@ -202,7 +202,7 @@ class NavigationCardStack extends React.Component<DefaultProps, Props, void> {
this._renderScene = this._renderScene.bind(this);
}
render(): React.Element<*> {
render(): React.Element<any> {
return (
<NavigationTransitioner
navigationState={this.props.navigationState}
@@ -212,7 +212,7 @@ class NavigationCardStack extends React.Component<DefaultProps, Props, void> {
);
}
_render(props: NavigationTransitionProps): React.Element<*> {
_render(props: NavigationTransitionProps): React.Element<any> {
const {
renderHeader
} = this.props;
@@ -237,7 +237,7 @@ class NavigationCardStack extends React.Component<DefaultProps, Props, void> {
);
}
_renderScene(props: NavigationSceneRendererProps): React.Element<*> {
_renderScene(props: NavigationSceneRendererProps): React.Element<any> {
const isVertical = this.props.direction === 'vertical';
const style = isVertical ?

View File

@@ -43,7 +43,7 @@ const {
} = ReactNative;
type Props = {
children?: React.Element<*>,
children?: React.Element<any>,
style?: any,
textStyle?: any,
viewProps?: any,

View File

@@ -86,7 +86,7 @@ function create(
this._bindPosition(nextProps);
}
render(): React.Element<*> {
render(): React.Element<any> {
this._pointerEvents = this._computePointerEvents();
return (
<Component

View File

@@ -152,7 +152,7 @@ class Incremental extends React.Component<DefaultProps, Props, State> {
}).done();
}
render(): ?React.Element<*> {
render(): ?React.Element<any> {
if (this._rendered || // Make sure that once we render once, we stay rendered even if incrementalGroupEnabled gets flipped.
!this.context.incrementalGroupEnabled ||
this.state.doIncrementalRender) {

View File

@@ -124,7 +124,7 @@ class IncrementalExample extends React.Component {
console.log('onDone:', stats);
}, 0);
}
render(): React.Element<*> {
render(): React.Element<any> {
return (
<IncrementalGroup
disabled={false}

View File

@@ -65,7 +65,7 @@ class IncrementalGroup extends React.Component {
};
}
render(): React.Element<*> {
render(): React.Element<any> {
return (
<Incremental
onDone={this.props.onDone}

View File

@@ -65,7 +65,7 @@ class SwipeableListView extends React.Component {
props: Props;
state: State;
_listViewRef: ?React.Element<*> = null;
_listViewRef: ?React.Element<any> = null;
_shouldBounceFirstRowOnMount: boolean = false;
static getNewDataSource(): Object {
@@ -118,7 +118,7 @@ class SwipeableListView extends React.Component {
}
}
render(): React.Element<*> {
render(): React.Element<any> {
return (
<ListView
{...this.props}
@@ -163,7 +163,7 @@ class SwipeableListView extends React.Component {
}
}
_renderRow = (rowData: Object, sectionID: string, rowID: string): React.Element<*> => {
_renderRow = (rowData: Object, sectionID: string, rowID: string): React.Element<any> => {
const slideoutView = this.props.renderQuickActions(rowData, sectionID, rowID);
// If renderRowSlideout is unspecified or returns falsey, don't allow swipe

View File

@@ -59,7 +59,7 @@ class SwipeableQuickActionButton extends React.Component {
textStyle: Text.propTypes.style,
};
render(): ?React.Element<*> {
render(): ?React.Element<any> {
if (!this.props.imageSource && !this.props.text) {
return null;
}

View File

@@ -46,7 +46,7 @@ class SwipeableQuickActions extends React.Component {
style: View.propTypes.style,
};
render(): React.Element<*> {
render(): React.Element<any> {
// $FlowFixMe found when converting React.createClass to ES6
const children = this.props.children;
let buttons = [];

View File

@@ -168,7 +168,7 @@ const SwipeableRow = React.createClass({
return true;
},
render(): React.Element<*> {
render(): React.Element<any> {
// The view hidden behind the main view
let slideOutView;
if (this.state.isSwipeableViewRendered) {

View File

@@ -90,15 +90,15 @@ type Props = {
*/
renderRow: (
rowData: any, sectionIdx: number, rowIdx: number, rowKey: string
) => ?React.Element<*>,
) => ?React.Element<any>,
/**
* Rendered when the list is scrolled faster than rows can be rendered.
*/
renderWindowBoundaryIndicator?: () => ?React.Element<*>,
renderWindowBoundaryIndicator?: () => ?React.Element<any>,
/**
* Always rendered at the bottom of all the rows.
*/
renderFooter?: () => ?React.Element<*>,
renderFooter?: () => ?React.Element<any>,
/**
* Pipes through normal onScroll events from the underlying `ScrollView`.
*/
@@ -138,7 +138,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) => React.Element<*>,
renderScrollComponent: (props: ?Object) => React.Element<any>,
/**
* Use to disable incremental rendering when not wanted, e.g. to speed up initial render.
*/
@@ -431,7 +431,7 @@ class WindowedListView extends React.Component {
this._firstVisible = newFirstVisible;
this._lastVisible = newLastVisible;
}
render(): React.Element<*> {
render(): React.Element<any> {
const {firstRow} = this.state;
const lastRow = clamp(0, this.state.lastRow, this.props.data.length - 1);
const rowFrames = this._rowFrames;
@@ -586,7 +586,7 @@ type CellProps = {
*/
renderRow: (
rowData: mixed, sectionIdx: number, rowIdx: number, rowKey: string
) => ?React.Element<*>,
) => ?React.Element<any>,
/**
* Index of the row, passed through to other callbacks.
*/

View File

@@ -58,7 +58,7 @@ class NetworkOverlay extends React.Component {
_listViewHighlighted: bool;
_listViewHeight: number;
_scrollView: ?ScrollView;
_detailViewItems: Array<Array<React.Element<*>>>;
_detailViewItems: Array<Array<React.Element<any>>>;
_listViewOnLayout: (event: Event) => void;
_captureRequestListView: (listRef: ?ListView) => void;
_captureDetailScrollView: (scrollRef: ?ScrollView) => void;
@@ -67,8 +67,8 @@ class NetworkOverlay extends React.Component {
sectionID: number,
rowID: number,
highlightRow: (sectionID: number, rowID: number) => void,
) => React.Element<*>;
_renderScrollComponent: (props: Object) => React.Element<*>;
) => React.Element<any>;
_renderScrollComponent: (props: Object) => React.Element<any>;
_closeButtonClicked: () => void;
// Map of `socketId` -> `index in `_requests``.
_socketIdMap: Object;
@@ -294,7 +294,7 @@ class NetworkOverlay extends React.Component {
sectionID: number,
rowID: number,
highlightRow: (sectionID: number, rowID: number) => void,
): React.Element<*> {
): React.Element<any> {
let urlCellViewStyle = styles.urlEvenCellView;
let methodCellViewStyle = styles.methodEvenCellView;
if (rowID % 2 === 1) {
@@ -327,7 +327,7 @@ class NetworkOverlay extends React.Component {
_renderSeperator(
sectionID: number,
rowID: number,
adjacentRowHighlighted: bool): React.Element<*> {
adjacentRowHighlighted: bool): React.Element<any> {
return (
<View
key={`${sectionID}-${rowID}`}
@@ -367,7 +367,7 @@ class NetworkOverlay extends React.Component {
this._listViewHeight = height;
}
_renderScrollComponent(props: Object): React.Element<*> {
_renderScrollComponent(props: Object): React.Element<any> {
return (
<RecyclerViewBackedScrollView {...props} />
);

View File

@@ -129,7 +129,7 @@ class Modal extends React.Component {
visible: true,
};
render(): ?React.Element<*> {
render(): ?React.Element<any> {
if (this.props.visible === false) {
return null;
}

View File

@@ -175,7 +175,7 @@ class NavigationTransitioner extends React.Component<any, Props, State> {
});
}
render(): React.Element<*> {
render(): React.Element<any> {
return (
<View
onLayout={this._onLayout}

View File

@@ -114,7 +114,7 @@ export type NavigationAnimationSetter = (
export type NavigationSceneRenderer = (
props: NavigationSceneRendererProps,
) => ?React.Element<*>;
) => ?React.Element<any>;
export type NavigationStyleInterpolator = (
props: NavigationSceneRendererProps,

View File

@@ -44,7 +44,7 @@ const _takeSnapshot = UIManager.takeSnapshot;
* @platform ios
*/
UIManager.takeSnapshot = async function(
view ?: 'window' | React.Element<*> | number,
view ?: 'window' | React.Element<any> | number,
options ?: {
width ?: number,
height ?: number,

View File

@@ -221,7 +221,7 @@ const Text = React.createClass({
touchableHandlePress: (null: ?Function),
touchableHandleLongPress: (null: ?Function),
touchableGetPressRectOffset: (null: ?Function),
render(): React.Element<*> {
render(): React.Element<any> {
let newProps = this.props;
if (this.props.onStartShouldSetResponder || this._hasPressHandler()) {
if (!this._handlers) {