Target Branch
0.81
Link to commit or PR to be picked
react/react-native#52530
Description
Summary:
This PR fixes two issues with display: contents implementation:
When a node with display: contents set is a leaf, it won't be cloned after the initial tree is built. The added test case covers this scenario.
It was possible for the subtree of display: contents nodes not to be cloned during layout. I don't have a minimal reproduction for this one, unfortunately. It was discovered in the Expensify app: [Due for payment 2025-07-28] [$250] [DEV] - iOS HybridApp crashes when opening a workspace expense that misses category Expensify/App#65268 , along with a consistent reproduction. In that specific case, it seems to be heavily tied to react-native-onyx, which is a state management library.
Changelog: [GENERAL][FIXED] - Fixed nodes with display: contents set being cloned with the wrong owner
X-link: react/yoga#1826
Reviewed By: adityasharat
Differential Revision: D78084270
Pulled By: j-piasecki
Target Branch
0.81
Link to commit or PR to be picked
react/react-native#52530
Description
Summary:
This PR fixes two issues with
display: contentsimplementation:display: contentsset is a leaf, it won't be cloned after the initial tree is built. The added test case covers this scenario.display: contentsnodes not to be cloned during layout. I don't have a minimal reproduction for this one, unfortunately. It was discovered in the Expensify app: [Due for payment 2025-07-28] [$250] [DEV] - iOS HybridApp crashes when opening a workspace expense that misses category Expensify/App#65268, along with a consistent reproduction. In that specific case, it seems to be heavily tied toreact-native-onyx, which is a state management library.Changelog: [GENERAL][FIXED] - Fixed nodes with
display: contentsset being cloned with the wrong ownerX-link: react/yoga#1826
Reviewed By: adityasharat
Differential Revision: D78084270
Pulled By: j-piasecki