Skip to content

Commit 1b4eaeb

Browse files
elicwhitefacebook-github-bot
authored andcommitted
Migrate NativeComponentType from codegenNativeComponent to HostComponent facebook#1
Summary: We need to migrate to HostComponent, this is the first batch. Changelog: [Internal] Migrate NativeComponentType from codegenNativeComponent to HostComponent Reviewed By: rickhanlonii Differential Revision: D17562879 fbshipit-source-id: ce1993b64a79cede3598c89ddff0dadf07fde92f
1 parent 89e3f70 commit 1b4eaeb

12 files changed

+24
-24
lines changed

Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
1616
import type {ViewProps} from '../View/ViewPropTypes';
1717

1818
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
19-
import {type NativeComponentType} from '../../Utilities/codegenNativeComponent';
19+
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
2020

2121
type NativeProps = $ReadOnly<{|
2222
...ViewProps,
@@ -53,4 +53,4 @@ type NativeProps = $ReadOnly<{|
5353

5454
export default (codegenNativeComponent<NativeProps>('ActivityIndicatorView', {
5555
paperComponentName: 'RCTActivityIndicatorView',
56-
}): NativeComponentType<NativeProps>);
56+
}): HostComponent<NativeProps>);

Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
import type {ViewProps} from '../View/ViewPropTypes';
1212
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
13-
import {type NativeComponentType} from '../../Utilities/codegenNativeComponent';
13+
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
1414

1515
type NativeProps = $ReadOnly<{|
1616
...ViewProps,
1717
|}>;
1818

1919
export default (codegenNativeComponent<NativeProps>(
2020
'RCTMaskedView',
21-
): NativeComponentType<NativeProps>);
21+
): HostComponent<NativeProps>);

Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type {ViewProps} from '../View/ViewPropTypes';
1515
import type {Double, WithDefault} from '../../Types/CodegenTypes';
1616

1717
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
18-
import {type NativeComponentType} from '../../Utilities/codegenNativeComponent';
18+
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
1919

2020
type NativeProps = $ReadOnly<{|
2121
...ViewProps,
@@ -32,4 +32,4 @@ type NativeProps = $ReadOnly<{|
3232

3333
export default (codegenNativeComponent<NativeProps>(
3434
'AndroidProgressBar',
35-
): NativeComponentType<NativeProps>);
35+
): HostComponent<NativeProps>);

Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
1616
import type {ViewProps} from '../View/ViewPropTypes';
1717

1818
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
19-
import {type NativeComponentType} from '../../Utilities/codegenNativeComponent';
19+
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
2020

2121
type NativeProps = $ReadOnly<{|
2222
...ViewProps,
@@ -32,4 +32,4 @@ type NativeProps = $ReadOnly<{|
3232

3333
export default (codegenNativeComponent<NativeProps>(
3434
'RCTProgressView',
35-
): NativeComponentType<NativeProps>);
35+
): HostComponent<NativeProps>);

Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'use strict';
1212

1313
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
14-
import {type NativeComponentType} from '../../Utilities/codegenNativeComponent';
14+
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
1515

1616
import type {
1717
DirectEventHandler,
@@ -67,4 +67,4 @@ type NativeProps = $ReadOnly<{|
6767

6868
export default (codegenNativeComponent<NativeProps>(
6969
'AndroidSwipeRefreshLayout',
70-
): NativeComponentType<NativeProps>);
70+
): HostComponent<NativeProps>);

Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
1515
import type {ViewProps} from '../View/ViewPropTypes';
1616

1717
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
18-
import {type NativeComponentType} from '../../Utilities/codegenNativeComponent';
18+
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
1919

2020
type NativeProps = $ReadOnly<{|
2121
...ViewProps,
@@ -46,4 +46,4 @@ type NativeProps = $ReadOnly<{|
4646

4747
export default (codegenNativeComponent<NativeProps>('PullToRefreshView', {
4848
paperComponentName: 'RCTRefreshControl',
49-
}): NativeComponentType<NativeProps>);
49+
}): HostComponent<NativeProps>);

Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type {ViewProps} from '../View/ViewPropTypes';
1414
import type {WithDefault} from '../../Types/CodegenTypes';
1515

1616
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
17-
import {type NativeComponentType} from '../../Utilities/codegenNativeComponent';
17+
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
1818

1919
type NativeProps = $ReadOnly<{|
2020
...ViewProps,
@@ -25,4 +25,4 @@ type NativeProps = $ReadOnly<{|
2525

2626
export default (codegenNativeComponent<NativeProps>(
2727
'RCTSafeAreaView',
28-
): NativeComponentType<NativeProps>);
28+
): HostComponent<NativeProps>);

Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
'use strict';
1111

1212
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
13-
import {type NativeComponentType} from '../../Utilities/codegenNativeComponent';
13+
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
1414
import type {ViewProps} from '../View/ViewPropTypes';
1515
import type {
1616
BubblingEventHandler,
@@ -40,4 +40,4 @@ type NativeProps = $ReadOnly<{|
4040

4141
export default (codegenNativeComponent<NativeProps>(
4242
'RCTSegmentedControl',
43-
): NativeComponentType<NativeProps>);
43+
): HostComponent<NativeProps>);

Libraries/Components/Slider/SliderNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import type {
1818
} from '../../Types/CodegenTypes';
1919

2020
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
21-
import {type NativeComponentType} from '../../Utilities/codegenNativeComponent';
21+
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
2222

2323
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
2424
import type {ImageSource} from '../../Image/ImageSource';
@@ -57,4 +57,4 @@ type NativeProps = $ReadOnly<{|
5757
export default (codegenNativeComponent<NativeProps>('Slider', {
5858
interfaceOnly: true,
5959
paperComponentName: 'RCTSlider',
60-
}): NativeComponentType<NativeProps>);
60+
}): HostComponent<NativeProps>);

Libraries/Components/Switch/SwitchNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
1515
import type {ViewProps} from '../View/ViewPropTypes';
1616

1717
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
18-
import {type NativeComponentType} from '../../Utilities/codegenNativeComponent';
18+
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
1919

2020
type SwitchChangeEvent = $ReadOnly<{|
2121
value: boolean,
@@ -42,4 +42,4 @@ type NativeProps = $ReadOnly<{|
4242

4343
export default (codegenNativeComponent<NativeProps>('Switch', {
4444
paperComponentName: 'RCTSwitch',
45-
}): NativeComponentType<NativeProps>);
45+
}): HostComponent<NativeProps>);

Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
1313
import type {ViewProps} from '../View/ViewPropTypes';
1414

1515
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
16-
import {type NativeComponentType} from '../../Utilities/codegenNativeComponent';
16+
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
1717

1818
type NativeProps = $ReadOnly<{|
1919
...ViewProps,
@@ -22,4 +22,4 @@ type NativeProps = $ReadOnly<{|
2222

2323
export default (codegenNativeComponent<NativeProps>(
2424
'RCTInputAccessoryView',
25-
): NativeComponentType<NativeProps>);
25+
): HostComponent<NativeProps>);

Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type {WithDefault} from '../../Types/CodegenTypes';
1414
import type {ViewProps} from '../View/ViewPropTypes';
1515

1616
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
17-
import {type NativeComponentType} from '../../Utilities/codegenNativeComponent';
17+
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
1818

1919
type NativeProps = $ReadOnly<{|
2020
...ViewProps,
@@ -25,4 +25,4 @@ type NativeProps = $ReadOnly<{|
2525
// Do not require this file in paper builds
2626
export default (codegenNativeComponent<NativeProps>(
2727
'UnimplementedNativeView',
28-
): NativeComponentType<NativeProps>);
28+
): HostComponent<NativeProps>);

0 commit comments

Comments
 (0)