Appearance issue
See original GitHub issueReact-native Appearance has some issue on background mode. Here is an video example how to reproduce the bug in the app https://ru.files.fm/u/x5uzfjqtb#/view/swr72wr5p
Appearance listener will change the colorScheme value to “light” when app is in background mode and never back to dark.
useEffect(() => {
const listener = ({colorScheme}: any) => {
setIsDarkMode(colorScheme === 'dark');
};
Appearance.addChangeListener(listener);
return () => {
Appearance.removeChangeListener(listener);
};
}, []);
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Body dysmorphic disorder - Symptoms and causes - Mayo Clinic
This mental disorder causes persistent, intense focus, shame and anxiety over perceived body defects, often resulting in many cosmetic procedures as a fix....
Read more >Appearance Concerns - Centre for Clinical Interventions
It is normal to feel dissatisfied with your appearance from time to time. However, if you are too concerned about your appearance it...
Read more >Nursing staff's experience of appearance issues in various ...
Healthcare providers meet patients with a wide range of appearance concerns, such as different disfiguring conditions, disabilities, ...
Read more >How Physical Appearance Issues lead to Teen Depression
A study has established that adolescents who have negative concerns about their body image can more easily be affected by teen depression.
Read more >Body Dissatisfaction, Importance of Appearance, and ... - NCBI
Besides negative body evaluation and the importance of appearance, ... has emerged as a central issue for boys and men (e.g. 35–38).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue like what @1111mp described.
Appearance.addChangeListener
will receive a wrong theme when app goes back to foreground.react-native: 0.64.1
I also encountered the same problem.
The phone is set to dark mode. When my app switches to the background, it will trigger a listener.The colorScheme parameter of the listener method prints light, while the one obtained by Appearance.getColorScheme() is dark. https://user-images.githubusercontent.com/31227919/117095257-771dad80-ad98-11eb-97d8-929b15d8f611.mov