You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by joonashak January 18, 2024
Recently discovered your useDarkMode() hook, and love it! I'm just running into an issue with Vite, where the dev server's hot reload/HMR resets the dark mode setting.
Repro steps:
Have dark mode as browser preference. Dark mode is displayed correctly.
Switch to light mode. Reload page to confirm that the preference is persisted.
Save a file watched by Vite's dev server. Theme changes back to dark mode as the hot-reload happens in browser.
This is pretty frustrating when working on light mode's colors, etc. Is there a way to have the user preference persisted over hot-reloads? Thanks!
The text was updated successfully, but these errors were encountered:
Discussed in #427
Originally posted by joonashak January 18, 2024
Recently discovered your
useDarkMode()
hook, and love it! I'm just running into an issue with Vite, where the dev server's hot reload/HMR resets the dark mode setting.Repro steps:
This is pretty frustrating when working on light mode's colors, etc. Is there a way to have the user preference persisted over hot-reloads? Thanks!
The text was updated successfully, but these errors were encountered: