On iOS simulator (13.3) and Android 10
I have an issue with Appearance
and useColorScheme
when I set up dark mode it's still returned "light".
import { useColorScheme, Appearance } from 'react-native';
const colorScheme = useColorScheme();
console.log(colorScheme, Appearance.getColorScheme()) // "light", "light"
Am I doing something wrong?
I found the problem.
Problem related to this pull request https://github.com/facebook/react-native/commit/f7b90336be25b78935549aa140131d4d6d133f7b - when debugger is active you will always get "light" theme. Just close debugger and everything will be good.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With