
Ask HN: Can i really write framework agnostic components for web? - palmanis
The web-components API gave some hope, that if we could leverage that, and create native like components, then we can compose them and make complex stuff.
To make them work with any other framework like Angular, React, etc we could write small adapters for those frameworks, which give us data-binding, etc. That ways we&#x27;re not really dependent on any framework for the core components, and can support many (if not all) the frameworks being used in our organization.<p>But after looking at it for last few days, it seems like pretty much nothing works on IE, even if it does, it&#x27;s with way too many limitations.<p>So is it really possible to write framework agnostic components in today&#x27;s JS landscape ?
======
k__
Aren't there polyfills out there?

[https://github.com/skatejs/skatejs#browser-
support](https://github.com/skatejs/skatejs#browser-support)

~~~
palmanis
Not really.... \- custom element polyfill build is failing \-
[https://cdnjs.com/libraries/webcomponentsjs](https://cdnjs.com/libraries/webcomponentsjs)
seem to support v0 spec and not v1

And at best, you could get something working (as long as you accept lesser
performance) on IE11, anything lower does not really work or requires even
more polyfills.

~~~
k__
Well then it seems like Web Components aren't a solution for IE users.

But on the other hand, how much IE users are left? Statcounter says that IE
usage is on 12% globally and shrinking.

I think web components are the future. The sooner we have a sophisticated
toolkit (think jQuery UI, Kendo UI, etc.) based on them the better.

Big players like React will steal this, if we're not careful. They want to be
seen as a view library to build components and not as a general data-flow
library that uses web components. I think this could be dangerous in the long
run.

~~~
palmanis
i would say a few lucky ones have the luxury of working on projects, where
they can say lets ignore the IE users. Most of us can't !!

And i completely agree with your last point. The reason we've been exploring
web-components was because we had developed a component library based on
Angular 1, and had a really painful time making it upgradable to Angular 2,
and realized in the process that it was a mistake to write component library
closely coupled to any framework. While i am really excited about web-
components, but their current state disappoints me.

It's kind of weird, pretty much same companies are the standards committee,
browser makers and framework writers... probably thats why we have multiple
ways to write web-component like things using propriety technologies, but not
much progress still in writing web-components natively based on the specs.

