notwaldorf / ama

:raising_hand: Ask @notwaldorf anything!
94 stars 13 forks source link

Polymerless webcomponents projects #82

Closed anxolerd closed 6 years ago

anxolerd commented 6 years ago

Hi,

Liked your webcomponents videos a lot — they are quite inspiring. What I'd like to ask is whether you know any more-less big project (at least of size of Mojibrag (BTW, is it still alive?)), which uses webcomponents, but uses pure webcomponents without all those Polymers or X-tags.

I don't see anything bad in using those libraries, but would like to see some project with pure webcomponents in the wild.

The interest is completely educational.

P.S. A-Frame while uses webcomponents, does a lot of things in their own way, thus not an option =(.

notwaldorf commented 6 years ago

The reason why you're probably not seeing any library-free large projects that use web components is that there's a lot of boilerplate needed to write a web component, since the spec is so low level. This is why libraries like Polymer or lit-html that already do this for you tend to be preferred; otherwise you end up writing your own generic template stamping method, ready() callback, etc, so that you don't copy paste the same code in every one of your vanilla web components, and at this point you're basically writing your own tiny Polymer -- might as well use the tested one :)

(and to answer your specific question: i do not know of any pure vanilla web components apps that are bigger than a demo)

anxolerd commented 6 years ago

Found this project in progress.

https://github.com/criticalbh/vanilla-web-components-spa

According to the description it is going to be Medium clone built as SPA with vanilla webcomponents.