Skip to content

Commit

Permalink
Fabric: Optimizations in view flattening algorithm
Browse files Browse the repository at this point in the history
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
  • Loading branch information
shergin authored and facebook-github-bot committed May 9, 2019
1 parent c60d9f8 commit 335c81e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions ReactCommon/fabric/components/view/ViewShadowNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 335c81e

Please sign in to comment.