mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
Refactor mapping of FabricComponentNames
Summary: Simple diff that refactors the usage of the sComponentNames to not require components to be part of the mapping when the name in JS is the same as the name in Native side. Reviewed By: shergin Differential Revision: D14594659 fbshipit-source-id: d1948b27e04686fefbf9b6e2b06d4f9317b97062
This commit is contained in:
committed by
Facebook Github Bot
parent
0c17992485
commit
ed0085ca1b
@@ -84,8 +84,6 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
|
||||
sComponentNames.put("Image", "RCTImageView");
|
||||
sComponentNames.put("ScrollView", "RCTScrollView");
|
||||
sComponentNames.put("Slider", "RCTSlider");
|
||||
sComponentNames.put("ReactPerformanceLoggerFlag", "ReactPerformanceLoggerFlag");
|
||||
sComponentNames.put("ReactTTRCRenderFlag", "ReactTTRCRenderFlag");
|
||||
sComponentNames.put("Paragraph", "RCTText");
|
||||
sComponentNames.put("Text", "RCText");
|
||||
sComponentNames.put("RawText", "RCTRawText");
|
||||
@@ -196,7 +194,13 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
|
||||
String component = sComponentNames.get(componentName);
|
||||
synchronized (mPreMountItemsLock) {
|
||||
mPreMountItems.add(
|
||||
new PreAllocateViewMountItem(context, rootTag, reactTag, component, props, isLayoutable));
|
||||
new PreAllocateViewMountItem(
|
||||
context,
|
||||
rootTag,
|
||||
reactTag,
|
||||
component != null ? component : componentName,
|
||||
props,
|
||||
isLayoutable));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user