react-dark-mode-toggle icon indicating copy to clipboard operation
react-dark-mode-toggle copied to clipboard

Flash when dark mode is the default mode

Open larturi opened this issue 4 years ago • 2 comments

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.

larturi avatar Aug 06 '21 15:08 larturi

I have this issue as well...

jimmytan123 avatar Sep 02 '21 04:09 jimmytan123

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

todd-elvers avatar Oct 28 '21 00:10 todd-elvers