diff --git a/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js b/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js index db20d579d..9ee432f56 100644 --- a/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +++ b/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js @@ -4,7 +4,9 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * + * @format */ + 'use strict'; const ColorPropType = require('ColorPropType'); @@ -30,7 +32,9 @@ const indeterminateType = function(props, propName, componentName, ...rest) { const indeterminate = props[propName]; const styleAttr = props.styleAttr; if (!indeterminate && styleAttr !== 'Horizontal') { - return new Error('indeterminate=false is only valid for styleAttr=Horizontal'); + return new Error( + 'indeterminate=false is only valid for styleAttr=Horizontal', + ); } }; @@ -38,8 +42,8 @@ const indeterminateType = function(props, propName, componentName, ...rest) { }; /** - * React component that wraps the Android-only `ProgressBar`. This component is used to indicate - * that the app is loading or there is some activity in the app. + * React component that wraps the Android-only `ProgressBar`. This component is + * used to indicate that the app is loading or there is activity in the app. * * Example: * @@ -60,7 +64,7 @@ const indeterminateType = function(props, propName, componentName, ...rest) { * }, * ``` */ -class ProgressBarAndroid extends ReactNative.NativeComponent { +class ProgressBarAndroid extends React.Component { static propTypes = { ...ViewPropTypes, @@ -106,7 +110,8 @@ class ProgressBarAndroid extends ReactNative.NativeComponent { }; render() { - return ; + const {forwardedRef, ...props} = this.props; + return ; } } @@ -117,7 +122,9 @@ const AndroidProgressBar = requireNativeComponent( nativeOnly: { animating: true, }, - } + }, ); -module.exports = ProgressBarAndroid; +module.exports = React.forwardRef((props, ref) => ( + +));