DEV Community

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

Collapse
 
kip13 profile image
kip

What are the differences with lit-html ?

Collapse
 
ben profile image
Ben Halpern

From what I'd gather:

htm is looking to act as a convenient alternative to jsx to fit the workflow of folks in react/preact land. lit-html is more of a whole new thing that is technically similar, but not coming from the same place in terms of developer experience.

One other difference in practical terms

htm:

As of 2.0.0, htm is stable, well-tested and ready for production use.

lit-html:

lit-html is currently in development. It's on the fast track to a 1.0 release, so we encourage you to use it and give us your feedback, but there are things that haven't been finalized yet and you can expect some changes.

Collapse
 
abraham profile image
Abraham Williams

lit-html has an RC release and is expecting a 1.0 release in January.

Another potential perk of lit-html is it's backed by a team of developers at Google and is well tested by being used in Polymer/LitElement.

Collapse
 
bennypowers profile image
Benny Powers ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡จ๐Ÿ‡ฆ

lit-html has no VDOM overhead

Collapse
 
equinusocio profile image
Mattia Astorino • Edited

And is made to build web components platform compliant, not abstractions.

Thread Thread
 
bennypowers profile image
Benny Powers ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡จ๐Ÿ‡ฆ

Good point. You won't have the same kinds of issues with event listeners and losing references to DOM