diff --git a/Libraries/Components/RefreshControl/RefreshControl.js b/Libraries/Components/RefreshControl/RefreshControl.js index 9b287cc4a18..366b1d917b1 100644 --- a/Libraries/Components/RefreshControl/RefreshControl.js +++ b/Libraries/Components/RefreshControl/RefreshControl.js @@ -29,7 +29,7 @@ if (Platform.OS === 'android') { } else { var RefreshLayoutConsts = {SIZE: {}}; } -type NativeRefreshControlType = Class>; +type NativeRefreshControlType = Class>; const NativeRefreshControl: NativeRefreshControlType = Platform.OS === 'ios' @@ -77,7 +77,7 @@ type AndroidProps = $ReadOnly<{| progressViewOffset?: ?number, |}>; -type Props = $ReadOnly<{| +export type RefreshControlProps = $ReadOnly<{| ...ViewProps, ...IOSProps, ...AndroidProps, @@ -138,7 +138,7 @@ type Props = $ReadOnly<{| * __Note:__ `refreshing` is a controlled prop, this is why it needs to be set to true * in the `onRefresh` function otherwise the refresh indicator will stop immediately. */ -class RefreshControl extends React.Component { +class RefreshControl extends React.Component { static SIZE = RefreshLayoutConsts.SIZE; _nativeRef: ?React.ElementRef = null; @@ -148,7 +148,7 @@ class RefreshControl extends React.Component { this._lastNativeRefreshing = this.props.refreshing; } - componentDidUpdate(prevProps: Props) { + componentDidUpdate(prevProps: RefreshControlProps) { // RefreshControl is a controlled component so if the native refreshing // value doesn't match the current js refreshing prop update it to // the js value.