mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: Use ShadowNode::sameFamily instead of getTag() to check for same family
Summary: We used to use `getTag` to check that some two nodes are clones of each other, not we have a dedicated method for that that exactly ensures that without reling on a sideeffect (wich tag equality is). That is just much less error-prone. Changelog: [Internal] Fabric-specific internal change. Reviewed By: mdvacca Differential Revision: D18231006 fbshipit-source-id: 6b247ed0eaded1fed8fd7fa820e80cd58602110c
This commit is contained in:
committed by
Facebook Github Bot
parent
c5980a4b0f
commit
6ffc93d657
@@ -59,7 +59,7 @@ static void updateMountedFlag(
|
||||
continue;
|
||||
}
|
||||
|
||||
if (oldChild->getTag() != newChild->getTag()) {
|
||||
if (!ShadowNode::sameFamily(*oldChild, *newChild)) {
|
||||
// Totally different nodes, updating is impossible.
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user