mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove mounting-layer hack
Summary: This hack should not be necessary. It should be fixed at Differ or LayoutAnimations level if there are existing issues there. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D28810021 fbshipit-source-id: 98b8d2ae9991ad527a3b3e90943d75063b2a4496
This commit is contained in:
committed by
Facebook GitHub Bot
parent
70da640946
commit
fc2153cc43
@@ -677,24 +677,6 @@ void Binding::schedulerDidFinishTransaction(
|
||||
newChildShadowView.props->revision > 1) {
|
||||
cppCommonMountItems.push_back(
|
||||
CppMountItem::CreateMountItem(newChildShadowView));
|
||||
|
||||
// Generally, DELETE operations can always safely execute at the end
|
||||
// of a MountItem batch. The usual expected order would be REMOVE and
|
||||
// then DELETE, for instance. However... in specific cases with
|
||||
// LayoutAnimations especially, a DELETE and CREATE may happen for a
|
||||
// View - in that order. The inverse is NOT possible - for example, we
|
||||
// do not expect a CREATE...DELETE in the same batch. That would
|
||||
// contradict itself - a node cannot be in the tree (CREATE) and
|
||||
// removed from the tree (DELETE) at the same time.
|
||||
cppDeleteMountItems.erase(
|
||||
std::remove_if(
|
||||
cppDeleteMountItems.begin(),
|
||||
cppDeleteMountItems.end(),
|
||||
[&](const CppMountItem &mountItem) {
|
||||
return mountItem.oldChildShadowView.tag ==
|
||||
newChildShadowView.tag;
|
||||
}),
|
||||
cppDeleteMountItems.end());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user