When trying to assign the variable "theme" (which receives the useColorScheme library) as a style, the following error is presented.
Light and dark styles were created in styles.js
.
Thank you very much in advance!
When trying to assign the variable "theme" (which receives the useColorScheme library) as a style, the following error is presented.
Light and dark styles were created in styles.js
.
Thank you very much in advance!
I'm having the same issue, also noticing that if you try and import the Appearance component it comes in as null.
Using the simulator or Android emulator
useColorScheme
belongs to 'react-native-appearance'
, not 'react-native'
.
Example
import { useColorScheme } from 'react-native-appearance'