question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set dark or light theme according to device preferences by default

See original GitHub issue

React Native 0.62 will have an Appearance module which gives us the preferred color scheme of the device. We can detect and switch to dark theme automatically by default if it’s preferred.

https://github.com/facebook/react-native/blob/a27e31c059971b1d554ad6c7c81706f08eafac87/RNTester/js/examples/Appearance/AppearanceExample.js#L14

It’ll be a breaking change due to React Native version requirement, so we might want to wait a bit and drop support for older versions of React Native when we release it.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
troZeecommented, Jul 30, 2020

I close this issue, because it has been implemented.

cc @Trancever

0reactions
github-actions[bot]commented, Jul 30, 2020

Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dark theme - Android Developers
Use the system setting (Settings -> Display -> Theme) to enable Dark theme. Use the Quick Settings tile to switch themes from the...
Read more >
Change to dark or color mode on your Android device
If light theme is on but an app is dark, it could be: Dark theme is on for the app, but not for...
Read more >
How to turn on dark mode on all your apps and devices
Scroll down and tap Settings, then General Settings and under 'theme' you can choose either light, dark or the system default. Facebook has ......
Read more >
Set your Web App to Dark/Light Mode based on User System ...
Detecting System theme using matchMedia()​​ It detects if the system is in a dark theme or light theme. The matches property of the...
Read more >
Use a light or dark appearance on your Mac - Apple Support
From left to right, samples of the Light, Dark, and Auto options shown. On your Mac, choose Apple menu > System Settings, then...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found