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

是否支持 createComponentLoader 异步? #47

Open
harttle opened this issue Jan 19, 2020 · 0 comments
Open

是否支持 createComponentLoader 异步? #47

harttle opened this issue Jan 19, 2020 · 0 comments

Comments

@harttle
Copy link
Member

harttle commented Jan 19, 2020

目前整个 ssr 是同步的,但 createComponentLoader 得到的 loader 的返回值是 ComponentClass|Promise<ComponentClass>。目前只支持返回 ComponentClass,后者渲染其 placeholder,问题是:是否要支持 Promise<ComponentClass>?目前主要考虑:

  • 返回 Promise 的 loader 典型用途是做按需加载,SSR 期间这一需求是否强烈
  • 为此 SSR 整体需要变成异步,为这个小功能是否值得牺牲一些性能
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant