Skip to content

Commit f02feb8

Browse files
sherginfacebook-github-bot
authored andcommitted
Fabric: Codegen for PullToRefresh component
Summary: Straightforward. Rick, I rename some stuff, I hope you are cool with that. Reviewed By: mdvacca Differential Revision: D15403306 fbshipit-source-id: 1dbd34060052a9bd39ed4211010f14b76fffcde6
1 parent e8b2145 commit f02feb8

File tree

10 files changed

+10
-181
lines changed

10 files changed

+10
-181
lines changed

Libraries/Components/RefreshControl/RCTRefreshControlNativeTypeSchema.js renamed to Libraries/Components/RefreshControl/PullToRefreshViewSchema.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212

1313
import type {SchemaType} from '../../../packages/react-native-codegen/src/CodegenSchema.js';
1414

15-
const RCTRefreshControlNativeTypeSchema: SchemaType = {
15+
const PullToRefreshViewSchema: SchemaType = {
1616
modules: {
17-
RCTRefreshControlNativeType: {
17+
PullToRefreshView: {
1818
components: {
19-
RCTRefreshControlNativeType: {
19+
PullToRefreshView: {
2020
extendsProps: [
2121
{
2222
type: 'ReactNativeBuiltInType',
@@ -27,7 +27,6 @@ const RCTRefreshControlNativeTypeSchema: SchemaType = {
2727
{
2828
name: 'onRefresh',
2929
optional: true,
30-
3130
bubblingType: 'bubble',
3231
typeAnnotation: {
3332
type: 'EventTypeAnnotation',
@@ -78,4 +77,4 @@ const RCTRefreshControlNativeTypeSchema: SchemaType = {
7877
},
7978
};
8079

81-
module.exports = RCTRefreshControlNativeTypeSchema;
80+
module.exports = PullToRefreshViewSchema;

Libraries/Components/RefreshControl/RCTRefreshControlNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export type NativeProps = $ReadOnly<{|
4343
refreshing: boolean,
4444
|}>;
4545

46-
type RCTRefreshControlNativeType = Class<NativeComponent<NativeProps>>;
46+
type PullToRefreshView = Class<NativeComponent<NativeProps>>;
4747

4848
module.exports = ((requireNativeComponent(
4949
'RCTRefreshControl',
50-
): any): RCTRefreshControlNativeType);
50+
): any): PullToRefreshView);

React/Fabric/Mounting/ComponentViews/ScrollView/RNPullToRefreshViewComponentView.mm

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77

88
#import "RNPullToRefreshViewComponentView.h"
99

10-
#import <react/components/scrollview/PullToRefreshViewComponentDescriptor.h>
11-
#import <react/components/scrollview/PullToRefreshViewEventEmitter.h>
12-
#import <react/components/scrollview/PullToRefreshViewProps.h>
10+
#import <react/components/rncore/ComponentDescriptors.h>
11+
#import <react/components/rncore/EventEmitters.h>
12+
#import <react/components/rncore/Props.h>
1313

1414
#import <React/RCTScrollViewComponentView.h>
1515
#import <React/RCTConversions.h>
1616

17-
1817
using namespace facebook::react;
1918

2019
@implementation RNPullToRefreshViewComponentView {
@@ -81,7 +80,7 @@ - (void)updateProps:(SharedProps)props oldProps:(SharedProps)oldProps
8180

8281
- (void)handleUIControlEventValueChanged
8382
{
84-
std::static_pointer_cast<PullToRefreshViewEventEmitter const>(_eventEmitter)->onRefresh();
83+
std::static_pointer_cast<PullToRefreshViewEventEmitter const>(_eventEmitter)->onRefresh({});
8584
}
8685

8786
- (void)_updateTitle

ReactCommon/fabric/components/scrollview/PullToRefreshViewComponentDescriptor.h

Lines changed: 0 additions & 20 deletions
This file was deleted.

ReactCommon/fabric/components/scrollview/PullToRefreshViewEventEmitter.cpp

Lines changed: 0 additions & 18 deletions
This file was deleted.

ReactCommon/fabric/components/scrollview/PullToRefreshViewEventEmitter.h

Lines changed: 0 additions & 25 deletions
This file was deleted.

ReactCommon/fabric/components/scrollview/PullToRefreshViewProps.cpp

Lines changed: 0 additions & 28 deletions
This file was deleted.

ReactCommon/fabric/components/scrollview/PullToRefreshViewProps.h

Lines changed: 0 additions & 31 deletions
This file was deleted.

ReactCommon/fabric/components/scrollview/PullToRefreshViewShadowNode.cpp

Lines changed: 0 additions & 16 deletions
This file was deleted.

ReactCommon/fabric/components/scrollview/PullToRefreshViewShadowNode.h

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)