Umi: [Feature Request] 支持配置首屏加载时loading组件

Created on 10 Sep 2020  ·  1Comment  ·  Source: umijs/umi

Background

在执行运行时配置相关代码的时候(尤其是若网络环境下执行getInitialState获取初始值),页面会一直保持白屏,这样会导致用户体验不佳

Proposal

以配置或约定路由的形式指定一个html文件,在页面打开的时候吧这个html的内容挂载到id=root的节点下,在运行时配置相关代码执行结束后,由react自动把之前挂载的内容替换掉

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings