mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
bd7ab6c90b
Summary: This implements a new ShadowNode trait that helps to propagate Yoga node `isDirty` flag down the root of the tree and clone siblings appropriately. Several Fabric components mutate its Yoga styles after the node was cloned. In such cases, we need to mark the node as dirty after doing so. The problem with this is that the parent node and its siblings were already updated (cloned or not) based on the previous value of the `isDirty` flag. This happens because this logic is implemented in YogaLayoutableShadowNode which is a base constructor that must be called before any other logic from a subclass can run. For now, this change enables that for SafeAreaView only (which seems to help with some junkiness issues), later we can extend the usage of this for other components if needed. Changelog: [Internal] Fabric-specific internal change. Reviewed By: JoshuaGross Differential Revision: D24719347 fbshipit-source-id: b0d050afea5de9c470e05e1b4c9e7052e00ae949