mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46120 Currently, the implementation of `Appearance` duplicates the validation logic of string `colorScheme` values multiple times. This leads to more complicated code and also unnecessary work in certain edge cases (e.g. when `NativeAppearance` is not registered). This refactors `Appearance` to be simpler and to do less work. I've also configured `NativeAppearance.setColorScheme` to be non-nullable because it has existed since 2023. Changelog: [Internal] Reviewed By: TheSavior Differential Revision: D61567881 fbshipit-source-id: 61cb51709dc716ad97ae1397105414e74fe57a28