简体   繁体   English

隐藏凌乱的渲染页面,直到 DomContentLoaded

[英]Hide messy rendered page until DomContentLoaded

My website is showing messy components until DomContentLoaded.在 DomContentLoaded 之前,我的网站一直显示杂乱无章的组件。 I would like to show a loading-spinner or hide the content until page is loaded.我想显示一个加载微调器或隐藏内容,直到页面加载。 I'm using React SSR with UmiJS3.我正在使用带有 UmiJS3 的 React SSR。 Google 看到的页面加载进度

I would suggest you to use Suspense API from React but it doesn't support ssr right now but they recommend Loadable components which referenced in here我建议你使用 React 中的 Suspense API 但它现在不支持 ssr 但他们推荐在此处引用的可加载组件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM