Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lobe UI FOUC (flash of unstyled content) #103

Closed
Zain-ul-din opened this issue Dec 25, 2023 · 4 comments
Closed

Lobe UI FOUC (flash of unstyled content) #103

Zain-ul-din opened this issue Dec 25, 2023 · 4 comments
Labels
🐛 Bug Something isn't working | 缺陷 Inactive No response in 30 days | 超过 30 天未活跃

Comments

@Zain-ul-din
Copy link

💻 系统环境 | Operating System

Windows

🌐 浏览器 | Browser

Chrome

🐛 问题描述 | Bug Description

It seems like ui.lobehub.com is using react server components that's why the actual theme changes after some time which causes the screen to flash white for a second before showing the dark theme.

🚦 期望结果 | Expected Behavior

Please can you guide how can we prevent FOUC (flash of unstyled content) when using react server components in Next Js 13 App directory?

📷 复现步骤 | Recurrence Steps

2023-12-26.00-17-46.mp4

📝 补充信息 | Additional Information

No response

@Zain-ul-din Zain-ul-din added the 🐛 Bug Something isn't working | 缺陷 label Dec 25, 2023
@sivert-io
Copy link

Bump

@arvinxx
Copy link
Contributor

arvinxx commented Dec 5, 2024

@sivert-io @Zain-ul-din just check lobechat implement here: lobehub/lobe-chat@4002d60#diff-0bccc9e6e125cd0067adf17a2297ef439b7ef8df6170ccc762db0b8cdd845fbf

@arvinxx arvinxx closed this as completed Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 Inactive No response in 30 days | 超过 30 天未活跃
Projects
None yet
Development

No branches or pull requests

4 participants
@sivert-io @arvinxx @Zain-ul-din and others