top | item 38435046

(no title)

oblak | 2 years ago

I've been fought by people insisting that if we're using a framework, we should be using it for everything, if it has it, even when both agree that doing it natively is actually less cumbersome. All that in the name of consistency. I think middle ground is a good solution.

On topic: I don't think WebComponents are going to "make it" until someone builds a nice framework on top of them. React, Vue, Svelte, etc. solve a number of problems that are not directly solved by Web Components. State management, rendering, routing - right now, these are, imho, the high level areas that need solid solutions for an UI app to function in any sane way. How much of that is solved by going Web Components?

discuss

order

spankalee|2 years ago

I work on Lit, which I would hesitate to call a framework, but gives a framework-like DX for building web components, while trying to keep opinions to a minimum and lock-in as low as possible.

It's got reactivity, declarative templates, great performance, SSR, TypeScript support, native CSS encapsulation, context, tasks, and more.

It's used to build Material Design, settings and devtools UIs for Chrome, some UI for Firefox, Reddit, Photoshop Web...

https://lit.dev if you're interested.

troupo|2 years ago

> lock-in as low as possible.

As in:

- reactivity. Specific to lit

- declarative templates. Specific to lit

- SSR. Specific to lit.

- context. Specific to lit.

- tasks. Specific to lit

"minimal" and "low lock-in".

Please do not hesitate to call it a framework. If you call React a framework, then lit is definitely a framework.

veeti|2 years ago

How do we know this won't be killed off by Google in six months?

earthboundkid|2 years ago

"Web Components" are the name for a dream, not an actual technology. The actual technologies involved -- customElement and shadow DOM -- are pretty crappy to use directly, and even when hidden behind a framework/library don't buy you that much. But people want it to be true that there is such a thing as a "Web Component" so the dream lives on.

gitaarik|2 years ago

Why do you think this? I've been using it for years and it works lovely, no complaints at all.

o11c|2 years ago

> I've been fought by people insisting that if we're using a framework, we should be using it for everything,

Remember the definition of a framework: a framework is just a library that does not play well with others.

jdmg94|2 years ago

Stencil does it, but the resulting web components are still not great to work with because of shadow dom and the missing standards you can't expect from custom elements. You want inline styles? hope your dev remember to drill those down.

DarkNova6|2 years ago

A foolish consistency is the hobgoblin of the little mind

toasted-subs|2 years ago

Svelte compiles into WebComponents.

beebeepka|2 years ago

That's good to know. I really liked what I saw last time I played with it but it's hard to find many job listings where people are using svelte. Almost everything is react and surprisingly, at from what I can tell, it's getting even bigger share in job postings I used to see. Hooray for uniformity, I guess.

steve_taylor|2 years ago

That’s news to me and probably everyone who uses Svelte including its developers.