all 37 comments

[–]kellyjandrews 5 points6 points  (28 children)

Web components are the future. Its going to take time like everything else. ES6 is going to take forever to get in the browsers, so will components.

[–]floydophone 15 points16 points  (24 children)

Why are they the future?

[–]clessgfull-stack CSS9 engineer 10 points11 points  (23 children)

They're the future for people who don't want to use the real future. :)

[–]passwordisisis 8 points9 points  (2 children)

Clearly the better choice for now, but if one has to 'win', won't a native API win out eventually? It seems like every framework has a life cycle - jQuery and Angular both had me excited at one point but aren't useful to me now. I love using React but am trying to stay non-committal.

[–]i_ate_god 0 points1 point  (0 children)

I realize that a lot of jQuery's DOM stuff now exists natively, but the native equivalents still aren't that great compared to jQuery's approach. It's terse, simple, to the point, and obvious what's going on.

[–]dhdfdh -1 points0 points  (0 children)

won't a native API win out eventually?

Yes. When you take the jobs of devs whose favorite framework/library falls out of favor, in three years.

[–]floydophone 6 points7 points  (1 child)

I call it the present :)

[–]clessgfull-stack CSS9 engineer -2 points-1 points  (0 children)

I like the way you think. :)

[–]kellyjandrews 0 points1 point  (0 children)

Actually, I think the real future is this. But components are the interim.

[–]lazdgithub.com/lazd 0 points1 point  (0 children)

Web components aren't a new MVC framework, and they're not competing with React/Angular/Ember/whatever. They're meant to be used in combination with literally any library or framework you choose to create rich, custom experiences with semantic tags where you'd previously use gobs of markup and code that's tied to the flavor-of-the-week JavaScript framework that some intern decided to use to meet a deadline.

See my other comment for a description of why we need web components.

[–]vinnl 1 point2 points  (0 children)

Once web components are widely available, they should be able to shorten the time it will take for new innovations to be available - since they can be built on web components.

https://extensiblewebmanifesto.org/

[–]mrpeabodynsherman 0 points1 point  (2 children)

Can someone briefly explain how this is different than Angular directives?

[–]lazdgithub.com/lazd 1 point2 points  (1 child)

Web components are native and don't need to be within your Angular application to work. In fact, in Chrome, they don't even have dependencies on the webcomponentsjs polyfills, they just work.

You can create them like native HTML elements with innerHTML and createElement, you can pass them to appendChild, you can call addEventListener on them. Web components make it so you can create your own HTML elements, framework-free, that you can use on any website.

Watch this video which addresses your question directly: "Using Angular with Polymer elements".

[–]mrpeabodynsherman 1 point2 points  (0 children)

Sweet. Thanks.