mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use plugins for RCTScrollViewComponentView
Summary: Use plugin architecture for `RCTScrollViewComponentView` Changelog: [Internal] Reviewed By: shergin Differential Revision: D18743825 fbshipit-source-id: d25162252d2dc4ac6ee67d48394b4dfa9ad134cb
This commit is contained in:
committed by
Facebook Github Bot
parent
5c6451247d
commit
0bbe3205ca
@@ -30,6 +30,7 @@ Class<RCTComponentViewProtocol> RCTFabricComponentsProvider(const char *name);
|
||||
|
||||
// Lookup functions
|
||||
Class<RCTComponentViewProtocol> RCTSafeAreaViewCls(void) __attribute__((used));
|
||||
Class<RCTComponentViewProtocol> RCTScrollViewCls(void) __attribute__((used));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
Class<RCTComponentViewProtocol> RCTFabricComponentsProvider(const char *name) {
|
||||
static std::unordered_map<std::string, Class (*)(void)> sFabricComponentsClassMap = {
|
||||
{"SafeAreaView", RCTSafeAreaViewCls},
|
||||
{"ScrollView", RCTScrollViewCls},
|
||||
};
|
||||
|
||||
auto p = sFabricComponentsClassMap.find(name);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#import "RCTConversions.h"
|
||||
#import "RCTEnhancedScrollView.h"
|
||||
#import "RCTFabricComponentsPlugins.h"
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
@@ -395,3 +396,8 @@ static void RCTSendPaperScrollEvent_DEPRECATED(UIScrollView *scrollView, NSInteg
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Class<RCTComponentViewProtocol> RCTScrollViewCls(void)
|
||||
{
|
||||
return RCTScrollViewComponentView.class;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#import "RCTParagraphComponentView.h"
|
||||
#import "RCTPullToRefreshViewComponentView.h"
|
||||
#import "RCTRootComponentView.h"
|
||||
#import "RCTScrollViewComponentView.h"
|
||||
#import "RCTSliderComponentView.h"
|
||||
#import "RCTSwitchComponentView.h"
|
||||
#import "RCTUnimplementedNativeComponentView.h"
|
||||
@@ -50,7 +49,6 @@ using namespace facebook::react;
|
||||
|
||||
[componentViewFactory registerComponentViewClass:[RCTViewComponentView class]];
|
||||
[componentViewFactory registerComponentViewClass:[RCTRootComponentView class]];
|
||||
[componentViewFactory registerComponentViewClass:[RCTScrollViewComponentView class]];
|
||||
[componentViewFactory registerComponentViewClass:[RCTPullToRefreshViewComponentView class]];
|
||||
[componentViewFactory registerComponentViewClass:[RCTImageComponentView class]];
|
||||
[componentViewFactory registerComponentViewClass:[RCTParagraphComponentView class]];
|
||||
|
||||
Reference in New Issue
Block a user