re: How to Implement "dark mode" with Gatsby & React Hooks VIEW POST


Hello. I want a dark mode by default, but when I use const darkMode = useDarkMode(true) it still keeps it to light mode by default. Any idea ?


Hard to know without seeing your code, my first guess is that your ‘dark-mode’ and ‘light-mode’ classes are applying the wrong CSS. Double check which classname is being applied to the body and which css properties are attached to those classes.

code of conduct - report abuse