Skip to content

Commit 2054671

Browse files
authored
fix: NativeComponent for RN 60 (#57)
1 parent 14174dc commit 2054671

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed
File renamed without changes.

js/RNCProgressBarAndroidNativeComponent.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@
99

1010
'use strict';
1111

12-
import type {
13-
Double,
14-
WithDefault,
15-
} from 'react-native/Libraries/Types/CodegenTypes';
16-
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
17-
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
18-
import type {NativeComponentType} from 'react-native/Libraries/Utilities/codegenNativeComponent';
12+
import {requireNativeComponent} from 'react-native';
13+
import type {HostComponent, ViewProps, Double, WithDefault} from 'react-native';
1914

2015
type NativeProps = $ReadOnly<{|
2116
...ViewProps,
@@ -30,6 +25,6 @@ type NativeProps = $ReadOnly<{|
3025
testID?: ?string,
3126
|}>;
3227

33-
export default (codegenNativeComponent<NativeProps>(
28+
export default (requireNativeComponent<NativeProps>(
3429
'RNCProgressBar',
35-
): NativeComponentType<NativeProps>);
30+
): HostComponent<NativeProps>);

0 commit comments

Comments
 (0)