Skip to content

Commit 0625c34

Browse files
julioxavierrfacebook-github-bot
authored andcommitted
Remove PropTypes from IncrementalPresenter (facebook#21343)
Summary: Related to facebook#21342 Pull Request resolved: facebook#21343 Reviewed By: RSNara Differential Revision: D10080219 Pulled By: TheSavior fbshipit-source-id: 3a9108208fe6aaa7a30b99f24ceef03e884ec48a
1 parent 748cf82 commit 0625c34

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

Libraries/Components/View/ViewPropTypes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type DirectEventProps = $ReadOnly<{|
5353
*
5454
* See http://facebook.github.io/react-native/docs/view.html#onlayout
5555
*/
56-
onLayout?: ?(event: LayoutEvent) => void,
56+
onLayout?: ?(event: LayoutEvent) => mixed,
5757

5858
/**
5959
* When `accessible` is `true`, the system will invoke this function when the

Libraries/Experimental/IncrementalPresenter.js

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010

1111
'use strict';
1212

13-
const DeprecatedViewPropTypes = require('DeprecatedViewPropTypes');
1413
const IncrementalGroup = require('IncrementalGroup');
1514
const PropTypes = require('prop-types');
1615
const React = require('React');
1716
const View = require('View');
1817

1918
import type {Context} from 'Incremental';
2019
import type {ViewStyleProp} from 'StyleSheet';
20+
import type {LayoutEvent} from 'CoreEventTypes';
2121

2222
/**
2323
* WARNING: EXPERIMENTAL. Breaking changes will probably happen a lot and will
@@ -31,25 +31,19 @@ import type {ViewStyleProp} from 'StyleSheet';
3131
*
3232
* See Incremental.js for more info.
3333
*/
34-
type Props = {
34+
type Props = $ReadOnly<{|
3535
name: string,
3636
disabled?: boolean,
37-
onDone?: () => void,
38-
onLayout?: (event: Object) => void,
37+
onDone?: () => mixed,
38+
onLayout?: (event: LayoutEvent) => mixed,
3939
style?: ViewStyleProp,
40-
children?: any,
41-
};
40+
children?: React.Node,
41+
|}>;
42+
4243
class IncrementalPresenter extends React.Component<Props> {
4344
context: Context;
4445
_isDone: boolean;
4546

46-
static propTypes = {
47-
name: PropTypes.string,
48-
disabled: PropTypes.bool,
49-
onDone: PropTypes.func,
50-
onLayout: PropTypes.func,
51-
style: DeprecatedViewPropTypes.style,
52-
};
5347
static contextTypes = {
5448
incrementalGroup: PropTypes.object,
5549
incrementalGroupEnabled: PropTypes.bool,

0 commit comments

Comments
 (0)