Closed silenceofthewans closed 3 years ago
Hey just wondering what was your solution to this issue? Trying to do this myself but having no luck at the moment. Thanks for your help
@MindsetZack I didn't use use-dark-mode and created my own dark mode logic which is basically checking state of a toggle and if its true then adding couple of dark mode classes on elements that I want a different color scheme on and when it's false removing them, there's couple of ways to do that like document methods or passing props and switching styles based on props using styled-components. If you then want to save the dark mode state in localStorage you can save your toggle value in a useState hook that stores in localStorage like this one .
fixed