mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-06 22:37:14 +08:00
Fabric: Optimizations in view flattening algorithm
Summary: This diff changes the condition in `ViewShadowNode::isLayoutOnly()` removing checking for `onLayout` event listener. We needed that before because the mechanism of emitting events was based on analyzing mutation instructures (we needed those to be generated for nodes with `onLayout`). Recenly we changed that algorithm deeply integrating in layout infra, so we don't need this anymore. Reviewed By: JoshuaGross, mdvacca Differential Revision: D15273491 fbshipit-source-id: 2d43f00d1b87369d5993fe5ba70c2de36b8ce0c5
This commit is contained in:
committed by
Facebook Github Bot
parent
c60d9f8c15
commit
335c81ec31
@@ -16,8 +16,6 @@ bool ViewShadowNode::isLayoutOnly() const {
|
||||
const auto &viewProps = *std::static_pointer_cast<const ViewProps>(props_);
|
||||
|
||||
return viewProps.collapsable &&
|
||||
// Event listeners
|
||||
!viewProps.onLayout &&
|
||||
// Generic Props
|
||||
viewProps.nativeId.empty() &&
|
||||
// Accessibility Props
|
||||
|
||||
Reference in New Issue
Block a user