mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Align View creation flow between Fabric and non-Fabric
Summary: Ship responsibility for most View creation logic to ViewManager, where it already largely lies, and simplify code in Fabric and non-Fabric mounting layers. Notably, some of this work was *already* being duplicated so we can expect an extremely tiny perf gain here. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D26742711 fbshipit-source-id: 4213766d4cd366bc69cd47d4654f7b269bb9e7f4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ea3495399b
commit
a65cd683ae
-8
@@ -282,14 +282,6 @@ public class NativeViewHierarchyManager {
|
||||
viewManager.createView(tag, themedContext, initialProps, null, mJSResponderHandler);
|
||||
mTagsToViews.put(tag, view);
|
||||
mTagsToViewManagers.put(tag, viewManager);
|
||||
|
||||
// Use android View id field to store React tag. This is possible since we don't inflate
|
||||
// React views from layout xmls. Thus it is easier to just reuse that field instead of
|
||||
// creating another (potentially much more expensive) mapping from view to React tag
|
||||
view.setId(tag);
|
||||
if (initialProps != null) {
|
||||
viewManager.updateProperties(view, initialProps);
|
||||
}
|
||||
} finally {
|
||||
Systrace.endSection(Systrace.TRACE_TAG_REACT_VIEW);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user