dy / xhtm

XHTM − eXtended Hyperscript Tagged Markup
MIT License
25 stars 2 forks source link

Zero is translated as empty string when htm is bound to vhtml #8

Closed aral closed 1 year ago

aral commented 1 year ago

This issue also affects htm: https://github.com/developit/htm/issues/241

dy commented 1 year ago

This seems to be a specifics of vhtml though. Not sure if it should be fixed here - best case it will make all numeric children fall to strings, but that's discrepancy from react/preact/htm/etc already, also I'm not fully aware if there are cases when number is actually needed.

FYI have a look at hyperf - it doesn't have that problem there and can be used as vhtml.

aral commented 1 year ago

@dy Agree; please feel free to close this (and thanks for the link to hyperf; will check it out) :)

aral commented 1 year ago

@dy Had a quick play with hyperf but it looks like it’s browser-only (failed while looking for document). I’m using vhtml to render on the server :)