mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Simplify StubViewTree creation (#51221)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51221 In the case of an empty root node, we don't need `buildStubViewTreeWithoutUsingDifferentiator` to create the initial `StubViewTree` When testing with Fantom, this caused an additional unnecessary clone of RootShadowNode. Changelog: [Internal] Reviewed By: lenaic Differential Revision: D74472766 fbshipit-source-id: 076e859a6c5795e9026c7a5f8246a5658db4a94b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
35c96007eb
commit
cf428bde1c
+1
-1
@@ -121,7 +121,7 @@ static void testShadowNodeTreeLifeCycleLayoutAnimations(
|
||||
ShadowNode::ListOfShared{singleRootChildNode})}));
|
||||
|
||||
// Building an initial view hierarchy.
|
||||
auto viewTree = buildStubViewTreeWithoutUsingDifferentiator(*emptyRootNode);
|
||||
auto viewTree = StubViewTree(ShadowView(*emptyRootNode));
|
||||
viewTree.mutate(
|
||||
calculateShadowViewMutations(*emptyRootNode, *currentRootNode));
|
||||
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ static void testShadowNodeTreeLifeCycle(
|
||||
ShadowNode::ListOfShared{singleRootChildNode})}));
|
||||
|
||||
// Building an initial view hierarchy.
|
||||
auto viewTree = buildStubViewTreeWithoutUsingDifferentiator(*emptyRootNode);
|
||||
auto viewTree = StubViewTree(ShadowView(*emptyRootNode));
|
||||
viewTree.mutate(
|
||||
calculateShadowViewMutations(*emptyRootNode, *currentRootNode));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user