forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fabric: Using state auto-repeating in RCTSafeAreaViewComponentView
Summary: This change introducing using `updateStateWithAutorepeat` for state updates in RCTSafeAreaViewComponentView. This way we can reduce the number of active commits and reduce jumps & relayout passes. The approach with a callback is better than using `_lastPaddingStateWasUpdatedWith` because: * When we compare the values, we can compare them with actual previous padding numbers stored in Shadow Tree. * The value stored in a UIView instance can go away because of a view being remounted because of flattening. Changelog: [Internal] Fabric-specific internal change. Reviewed By: JoshuaGross Differential Revision: D24719345 fbshipit-source-id: 9bf1ae284875b4c99cf23be2fcc9a829eb8a895e
- Loading branch information
1 parent
bd7ab6c
commit 5c4979b
Showing
2 changed files
with
26 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters