Go Long on Web Components
medium.com
medium.com
They punted on important things, like inter-component communication, state management, and even code organization (templates, styles, and scripts are all in the component together? Seems great until it falls over in apps of any consequence)
At the end of the day, frameworks like React, Vue, and even Angular are solving the problem for application developers more comprehensively.
I just don't see a future for web components, other than for folks who want the latest and greatest thing and care more about mastering complexity than delivering apps quickly.
Edit: One other thing that I think will prove, in time, to be a bad idea, is this notion that everything must be its own component. Apps are interconnected, and most "components" are not going to be re-used in practice. Why enforce this segregation when 90% of the time it's a hindrance? By all means de-couple when there are re-usable bits, but that's just not true most of the time.
As the React docs state:
> React and Web Components are built to solve different problems. Web Components provide strong encapsulation for reusable components, while React provides a declarative library that keeps the DOM in sync with your data. The two goals are complementary. As a developer, you are free to use React in your Web Components, or to use Web Components in React, or both.
https://facebook.github.io/react/docs/web-components.html
The author seems to understand this, but still seems to indicate that Web Components lessen the need for DOM view frameworks, when actually they just make it easier to encapsulate widgets.
The Aurelia argument seems to be that it's the Web Component spec that's not entirely all together still, not Aurelia's version of web components at a somewhat orthogonal angle to the spec.
This thread from the developer: https://news.ycombinator.com/item?id=8950360
HTML Imports are only implemented in Chrome and it is going to stay that way, Firefox and Safari aren't having it. This is arguably a bummer but not critical for Web Components.
What is critical is that Custom Elements and Shadow DOM (V1) are in the latest Chrome and Safari but not on the horizon for Firefox and Edge. Supposedly it is planned, but unclear when it will actually arrive. 2018?
I've been rooting for web components for a long time now. But, I still don't think it's ready for prime time. Vue has been serving me well, and feels just like web components when writing code.
Is there any place you can go look at Web Components built by others and contribute your own? plus a package manager to include them easily in your projects would be the best way for them to come to light.
Check out https://github.com/arqex/freezer if you like immutable data, it works very well with Polymer. All you need to do to integrate them is something like this: https://github.com/myfreeweb/micro-panel/blob/34aeb46600fab5... (the itemModified stuff is extra, specific to my app) Then just pass the freezer object or its children down the component tree with one-way bindings.
Who uses Web Components? (Besides, apparently, the YouTube rewrite in 2017.)
So of course they work with anything and are "natural". There is nothing in them! It's a macro or preprocessor system if you want..
And HTML Imports provide deduplication. They're a solution to the "I have four copies of jQuery on my page" problem.
Mind you, I'm not disparaging Eich and Berners Lee, only their products. Web technology is a mess. I was horrified when I saw my first html all those long years ago. I'm horrified still. And saddened to think what might have been.
Although, not putting down the guys. Regretting the direction their work went.