1. 33
  1.  

  2. 2

    A lot of interesting concerns. But the author thinks that web components directly compete with web frameworks. I’d see web components more as a building block for frameworks and as an integration point. For example, in Elm you can use a web component implemented in another framework. Without web components this was difficult because Elm wants to own the DOM as many other frameworks. With web components, elm still owns the outer DOM, the other framework the shadow DOM.

    (the global namespace makes this awkward)

    1. 1

      There’s a lot to agree with here.

      7 seems like a weak argument. That just looks like the pattern seen in Java interfaces, or ObjC delegates. React also implements lifecycle callbacks as methods. (The name attributeChangedCallback seems off, though. JS makes a lot of annoying naming decisions.)

      I haven’t tried building anything significant in Svelte. On the one hand, it looks really simple and attractive. On the other hand, I’m afraid that I end up fighting the template syntax at a certain point, like old AngularJS.

      1. 2

        The design tastes of Svelte and old AngularJS are polar opposites. Rich Harris (author of article/Svelte) is also trying to establish a consensus templating language called HTMLx to support a broader ecosystem. I’ve found Svelte templating to be incomplete in some areas, but I’m using it full-time now and frown at the thought of returning to another of the major frameworks.