lobehub / lobe-ui

🍭 Lobe UI - an open-source UI component library for building AIGC web apps
https://ui.lobehub.com
MIT License
919 stars 142 forks source link

Lobe UI FOUC (flash of unstyled content) #103

Open Zain-ul-din opened 9 months ago

Zain-ul-din commented 9 months ago

💻 系统环境 | 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

https://github.com/lobehub/lobe-ui/assets/78583049/ac9ac1d8-647b-4b2f-a382-dbe6715e88ff

📝 补充信息 | Additional Information

No response

lobehubbot commented 9 months ago

👀 @Zain-ul-din Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

SivertGullbergHansen commented 6 months ago

Bump