Live data from Hacker News

Lit: a library for building fast, lightweight web components

lit.dev

1–10 of 180 posts

Re: Lit: a library for building fast, lightweight web components

#7
post #4

Great project but I can't stand syntax such as decorators.

They are optional for what it’s worth. They are also landing in standard JS soon.

The proposal is stuck at stage 3. AFAIK, to proceed to stage 4, it needs two independent implementations, but Firefox [0] and Chromium [1] didn't see any progress in this area for about a year. Personally, after working with Angular for many years, that's not a language feature I am looking forward to.

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=1781212

[1] https://issues.chromium.org/issues/42202709

Re: Lit: a library for building fast, lightweight web components

#9
The evolution of lit is fascinating to watch because it's built and promoted by people with rather visible and public dislike of everything React. And yet, it's already turned into React-lite.

- Custom HTML-like syntax

    
- Custom Javascript rules

    // valid JS, invalid lit
    const tagName= "a";
    
    `Some link`
- Custom rules for special functions.

    // classMap looks like a regular JS function, but it's not.
    // Both of these will produce an error
    
    Static and dynamic

    Static and dynamic
- Context https://lit.dev/docs/data/context/

- Experimental compiler: https://github.com/lit/lit/tree/main/packages/labs/compiler#...

Re: Lit: a library for building fast, lightweight web components

#10

Great project but I can't stand syntax such as decorators.

Just to add to a sibling comment, they are optional and not in a “optional but if you dont use them it really sucks” kind of way.

The Lit authors tried hard to use vanilla JS everywhere they could, and it shows.

Post reply on HN