Cannot read property 'initialMode' of undefined
Closed this issue · 4 comments
rishimukherjee commented
I am getting the following error:
Cannot read property 'initialMode' of undefined
.
I am just importing
import { useDarkMode } from 'react-native-dark-mode';
then calling
const isDarkMode = useDarkMode();
It gives me this error. I am on React Native 0.60.4 and react-native-dark-mode 0.1.2.
DimitarNestorov commented
That's strange. initialMode
isn't pascal case. I need more information. Does this happen on Android only or on iOS only or both? If it's only iOS did you run pod install after npm install
/yarn add
?
rishimukherjee commented
Sorry, I updated it to camelCase. So, this error is in iOS and not in android.
After I saw your reply, I did a pod install and it worked. Do you want me to make a pull request to update the doc in the Readme for this?
cesargdm commented
cesargdm commented