Remove PropTypes from IncrementalPresenter (#21343)

Summary:
Related to https://github.com/facebook/react-native/issues/21342
Pull Request resolved: https://github.com/facebook/react-native/pull/21343

Reviewed By: RSNara

Differential Revision: D10080219

Pulled By: TheSavior

fbshipit-source-id: 3a9108208fe6aaa7a30b99f24ceef03e884ec48a
This commit is contained in:
Julio Xavier 2018-09-27 10:42:17 -07:00 committed by Facebook Github Bot
parent 748cf82c97
commit 0625c348cc
2 changed files with 8 additions and 14 deletions

View File

@ -53,7 +53,7 @@ type DirectEventProps = $ReadOnly<{|
*
* See http://facebook.github.io/react-native/docs/view.html#onlayout
*/
onLayout?: ?(event: LayoutEvent) => void,
onLayout?: ?(event: LayoutEvent) => mixed,
/**
* When `accessible` is `true`, the system will invoke this function when the

View File

@ -10,7 +10,6 @@
'use strict';
const DeprecatedViewPropTypes = require('DeprecatedViewPropTypes');
const IncrementalGroup = require('IncrementalGroup');
const PropTypes = require('prop-types');
const React = require('React');
@ -18,6 +17,7 @@ const View = require('View');
import type {Context} from 'Incremental';
import type {ViewStyleProp} from 'StyleSheet';
import type {LayoutEvent} from 'CoreEventTypes';
/**
* WARNING: EXPERIMENTAL. Breaking changes will probably happen a lot and will
@ -31,25 +31,19 @@ import type {ViewStyleProp} from 'StyleSheet';
*
* See Incremental.js for more info.
*/
type Props = {
type Props = $ReadOnly<{|
name: string,
disabled?: boolean,
onDone?: () => void,
onLayout?: (event: Object) => void,
onDone?: () => mixed,
onLayout?: (event: LayoutEvent) => mixed,
style?: ViewStyleProp,
children?: any,
};
children?: React.Node,
|}>;
class IncrementalPresenter extends React.Component<Props> {
context: Context;
_isDone: boolean;
static propTypes = {
name: PropTypes.string,
disabled: PropTypes.bool,
onDone: PropTypes.func,
onLayout: PropTypes.func,
style: DeprecatedViewPropTypes.style,
};
static contextTypes = {
incrementalGroup: PropTypes.object,
incrementalGroupEnabled: PropTypes.bool,