DEV Community

Discussion on: Hyperscript Tagged Markup (HTM): JSX alternative using standard tagged templates, with compiler support.

Collapse
 
kayis profile image
K

I'm torn.

On the one side it works without pre-compilation, on the other hand nobody deploys stuff without pre-compliation these days anyway.

On the one hand it has the shorter end-tag syntax, on the other hand most components have short names anyway.

<Text>Hello</Text>
h`<${Text}>Hello<//>`

<VeryLongComponentName>Hello</VeryLongComponentName>
h`<${VeryLongComponentName}>Hello<//>`

<List><Item>1</Item><Item>2</Item><Item>3</Item><Item>4</Item<Item>5</Item></List>
h`<${List}><${Item}>1<//><${Item}>2<//><${Item}>3<//<${Item}>4<//><${Item}>5<//><//>`

I think, the end-tags are a bit harder to read and with many short components it leads to more typing.

But I think this is a small price to pay for getting rid of tanspiling in PoCs or such.