Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

render async generator lists and use it as server component #95

Closed
Tracked by #1
aralroca opened this issue Mar 3, 2024 · 0 comments · Fixed by #96
Closed
Tracked by #1

render async generator lists and use it as server component #95

aralroca opened this issue Mar 3, 2024 · 0 comments · Fixed by #96

Comments

@aralroca
Copy link
Collaborator

aralroca commented Mar 3, 2024

This should be possible to do it:

async function* List() {
  yield <li>{await foo()}</li>;
  yield <li>{await bar()}</li>;
  yield <li>{await baz()}</li>;
}

This can be used as a server component:

<List />

And the HTML is resolved via streaming.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant