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
If we didn't have resolvedTheme and only used theme, you'd lose information about the state of your UI (you would only know the theme is "system", and not what it resolved to).
If you like this proposal, I would be happy to provide examples for other frameworks and submit a pull request.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In the current dark mode, if the system preference theme changes, the application will not reflect the change.
I recommend adding an event listener to observe theme changes.
It also can resolve the #1757
Vite
Add new
useSystemPreferenceDark
hookUpdate
ThemeProvider
, add a newresolvedTheme
value inuseTheme
If you like this proposal, I would be happy to provide examples for other frameworks and submit a pull request.
Beta Was this translation helpful? Give feedback.
All reactions