Hacker News new | ask | show | jobs
by spankalee 1049 days ago
Lit uses standard languages, doesn't require a compiler, is faster, and is smaller as you amortize the library size over a collection of elements. Those are real differences.
2 comments

> uses standard languages, doesn't require a compiler

It recommends a build step, but yes, you can use it without one. Also, TypeScript isn't a standard language. So if you're using .ts you may as well use .svelte.

> is faster

I don't know that Svelte has been benchmarked with custom elements. Either way it's plenty fast.

> is smaller as you amortize the library size over a collection of elements

That's kind of a funny thing to worry about. It has improved in Svelte 4, though. https://svelte.dev/blog/svelte-4 I also don't know that Lit is so small in practice. With Lit you get to use map and the ternary operator and all that jazz, like React. https://lit.dev/docs/templates/conditionals/

When did @click and so on become part of HTML?