Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Flash when dark mode is the default mode #20

Open
larturi opened this issue Aug 6, 2021 · 2 comments
Open

Flash when dark mode is the default mode #20

larturi opened this issue Aug 6, 2021 · 2 comments

Comments

@larturi
Copy link

larturi commented Aug 6, 2021

If the CSS is setup to default to light mode, but the user selects dark mode, the next time they visit the app, they will be in dark mode. However, the user will see a flash of light mode before the app is spun up and useDarkMode is called.

@jimmytan123
Copy link

I have this issue as well...

@todd-elvers
Copy link
Contributor

todd-elvers commented Oct 28, 2021

I branched off of this repo and created react-dark-mode-toggle-2 to solve this problem and merge an outstanding PR.

If you have the bandwidth, please give it a try: https://github.com/todd-elvers/react-dark-mode-toggle-2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants