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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] Ability to describe an async component #1813

Open
bigopon opened this issue Sep 6, 2023 · 1 comment
Open

[feature request] Ability to describe an async component #1813

bigopon opened this issue Sep 6, 2023 · 1 comment

Comments

@bigopon
Copy link
Member

bigopon commented Sep 6, 2023

馃敠 Context

At the moment, loading components asynchronously can be done via <au-compose/>, though it's not always desirable since this way comes with some boilerplate:

<au-compose component.bind="loadMyComponent()">

This is also hard for bundler to statically analyse. Ideally we should have a way to declare an async component in a simpler/direct way:

export const MyElement = CustomElement.async(() => import('path/to-));

Another declarative-ish form of this is the html equivalent:

<template as-custom-element="my-component" async="path/to/...">

cc @Sayan751 @fkleuver

@Sayan751 Sayan751 added this to the v2.x milestone Dec 28, 2023
@Sayan751
Copy link
Contributor

@bigopon Sounds like a great idea. I think it is would be a great addition for a future minor version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants