Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PropTypes from IncrementalPresenter #21343

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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