mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Replace React.AbstractComponent with component type in ProgressBarAndroid.android.js (#46928)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46928 Prepare for the ref-as-prop typing change in flow. Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D64113211 fbshipit-source-id: f850739f9116cf0cc8705e541a97333aa04c3a44
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c00f0d36b1
commit
f98006830c
+9
-6
@@ -78,7 +78,12 @@ export type ProgressBarAndroidProps = $ReadOnly<{|
|
||||
* },
|
||||
* ```
|
||||
*/
|
||||
const ProgressBarAndroid = (
|
||||
const ProgressBarAndroidWithForwardedRef: component(
|
||||
ref: React.RefSetter<
|
||||
React.ElementRef<typeof ProgressBarAndroidNativeComponent>,
|
||||
>,
|
||||
...props: ProgressBarAndroidProps
|
||||
) = React.forwardRef(function ProgressBarAndroid(
|
||||
{
|
||||
// $FlowFixMe[incompatible-type]
|
||||
styleAttr = 'Normal',
|
||||
@@ -89,7 +94,7 @@ const ProgressBarAndroid = (
|
||||
forwardedRef: ?React.RefSetter<
|
||||
React.ElementRef<typeof ProgressBarAndroidNativeComponent>,
|
||||
>,
|
||||
) => {
|
||||
) {
|
||||
return (
|
||||
<ProgressBarAndroidNativeComponent
|
||||
styleAttr={styleAttr}
|
||||
@@ -99,12 +104,10 @@ const ProgressBarAndroid = (
|
||||
ref={forwardedRef}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
const ProgressBarAndroidToExport = React.forwardRef(ProgressBarAndroid);
|
||||
});
|
||||
|
||||
module.exports =
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
(ProgressBarAndroidToExport: typeof ProgressBarAndroidNativeComponent);
|
||||
(ProgressBarAndroidWithForwardedRef: typeof ProgressBarAndroidNativeComponent);
|
||||
|
||||
Reference in New Issue
Block a user