jsx2tag
jsx2tag copied to clipboard
Optimize hoisted static content
Based on this tweet, and its code example, "truly constant elements" are passed right away as children.
uhtml and friends have this Hole class concept, that would make it kinda easier to aggregate children as arrray, but there's no way to pass this check around and help other cases too, and currently, the logic doesn't aggregate "holes" in an efficient way, as empty text nodes are inserted in between.
This might not even be a real-world performance issue, but it's something to think about, either here or in the specialized transformer, if even possible with ease.
P.S. right now everything looks fine and working as expected