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

Support components that return an Array of Elements (Fragments) #173

Closed
JRJurman opened this issue Aug 9, 2021 · 3 comments
Closed

Support components that return an Array of Elements (Fragments) #173

JRJurman opened this issue Aug 9, 2021 · 3 comments

Comments

@JRJurman
Copy link
Member

JRJurman commented Aug 9, 2021

Summary

React supports this using Fragments, we should look at doing something similar. Maybe DocumentFragments 🤷‍♂️ ? This may be unnaturally hard given that we attach so much data to the element being generated 🤔

@JRJurman
Copy link
Member Author

This may be accomplished when we update our dependencies from their original root (see Tram-One/nanohtml#19, Tram-One/hyperx#7, and Tram-One/nanomorph#4)

@JRJurman JRJurman mentioned this issue Jun 26, 2022
4 tasks
@JRJurman JRJurman changed the title Support components that return an Array of Elements Support components that return an Array of Elements (Fragments) Jun 26, 2022
@JRJurman
Copy link
Member Author

JRJurman commented Jun 26, 2022

Some of this work has been done here: b40f101

This work does not rely on updates to the underlying libraries (which upon more inspection, appear to just expose interfaces for defining how to handle fragments, and don't actually offer any solutions).

@JRJurman
Copy link
Member Author

JRJurman commented Jul 3, 2022

We implemented fragments in #197, if there is a strong case we could look into supporting returning a list of elements, and wrapping that in an implicit fragment, but that would likely over-complicate the type interface.

@JRJurman JRJurman closed this as completed Jul 3, 2022
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