mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
ebdce9b3b0
Summary: Setting `padding` for Yoga node dirties it. In the previous implementation, we did it for all newly cloned nodes. Now we do it only if State actually changes. This is important because usually, SafeAreaView is a container node; that means that if some descendant of SafeAreaView changes its state, the recloning of all nodes down to root node will cause dirtying SafeAreaView and cause relayout if the whole subtree. E.g., if we put ScrollView inside SafeAreaView without the fix, onScroll events will cause Yoga relayout (because ScrollView updates own state on debounced onScroll event). Changelog: [Internal] Fabric-specific internal change. Reviewed By: JoshuaGross Differential Revision: D18987158 fbshipit-source-id: a3130c607c37e54ce813113222cd4a3872c58b6a