From ed0085ca1bc786e324759c7d645d28bbf22ddd70 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Fri, 29 Mar 2019 00:39:43 -0700 Subject: [PATCH] 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 --- .../com/facebook/react/fabric/FabricUIManager.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java index 6b1ec05d0c..11b95ef994 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java @@ -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)); } }