-
Greatings, I am writing some app with van jsx. I am facing a problem. While a function child returns an array. It won't be rendered.
It seems vanjs-core treat the return of the function child as I would like to ask if it would be a good idea to add array-related rendering implementation here ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
If want to support functions that return array-type components. It will need to do a lot of array comparison work. This may not be conducive to keeping vanjs small in size. |
Beta Was this translation helpful? Give feedback.
-
You can wrap the result into a pass-through container ( |
Beta Was this translation helpful? Give feedback.
You can wrap the result into a pass-through container (
span
for inline elements anddiv
for block elements) if multiple elements need to be returned.See https://vanjs.org/demo#blog.