Skip to content

Commit

Permalink
Remove PropTypes from IncrementalPresenter (facebook#21343)
Browse files Browse the repository at this point in the history
Summary:
Related to facebook#21342
Pull Request resolved: facebook#21343

Reviewed By: RSNara

Differential Revision: D10080219

Pulled By: TheSavior

fbshipit-source-id: 3a9108208fe6aaa7a30b99f24ceef03e884ec48a
  • Loading branch information
julioxavierr authored and facebook-github-bot committed Sep 27, 2018
1 parent 7117c0d commit d1d23a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Libraries/Components/View/ViewPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 7 additions & 13 deletions Libraries/Experimental/IncrementalPresenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

'use strict';

const DeprecatedViewPropTypes = require('DeprecatedViewPropTypes');
const IncrementalGroup = require('IncrementalGroup');
const PropTypes = require('prop-types');
const React = require('React');
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
Expand All @@ -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,
Expand Down

0 comments on commit d1d23a6

Please sign in to comment.