如何无感切换主题 #49456
SuperCodeCandy
started this conversation in
General
如何无感切换主题
#49456
Replies: 2 comments
-
https://ant-design.github.io/antd-style/best-practice/fix-switch-theme-fouc |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What problem does this feature solve?
Next.Js
中,如果想首屏渲染的时候无感切换主题色,现在看起来不能办到。dark
模式,本地存储内有一份主题色是light
模式,那么当进入到页面的时候会先展示为dark
模式,在useEffect
从本地存储内拿到主题色,再切换为light
模式,这样会导致屏幕主题色会从dark
模式闪烁一下进入到light
模式。What does the proposed API look like?
我希望可以直接读取根标签上类名颜色来生成首屏的主题样式
Beta Was this translation helpful? Give feedback.
All reactions