-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[0.76.2] Cannot reset color scheme #47725
Comments
Warning Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2. |
Warning Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2. |
Patching const {NativeAppearance} = state;
if (NativeAppearance != null) {
NativeAppearance.setColorScheme(colorScheme ?? 'unspecified');
- state.appearance = {colorScheme};
+ state.appearance = {colorScheme:getColorScheme()};
} Unsure whether this would be the desired fix. |
Description
Calling
Appearance.setColorScheme(null)
orAppearance.setColorScheme(undefined)
no longer resets the color schemeuseColorScheme
returns like on previous rn versions.Steps to reproduce
Appearance.setColorScheme(null)
orAppearance.setColorScheme(undefined)
useColorScheme()
will returnnull
orundefined
, instead of"light"
or"dark"
based on the OS setting.React Native Version
0.76.2
Affected Platforms
Runtime - Android, Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@sangonz193/frowning-green-donut
Screenshots and Videos
Expo 52 shows the bug, Expo 51 shows how it behaved before. Device used here was configured for dark mode.
Expo.52.mp4
Expo.51.mp4
The text was updated successfully, but these errors were encountered: