Grokking React Native
Vote

0% completed

​

Implementing Dark Mode in React Native

A new app from the blank Expo template reports light mode even when the phone is set to dark. The cause is one line in app.json, and you must change it before anything else in this lesson can work:

{ "expo": { "userInterfaceStyle": "automatic" } }

The blank template ships with this value set to "light", which restricts the app to its light appearance. The value "automatic" tells the operating system that your app follows the system setting and wants to hear about changes. On Android, a development build also needs the `expo-system-ui

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content