5 ms·
Another option that is interesting right now is Polymer 2.x if you haven't tried it recently, give it a shot. https://vuejs.org/v2/guide/comparison.html#Polyme
by ergo14 9y ago
Another option that is interesting right now is Polymer 2.x if you haven't tried it recently, give it a shot.
https://vuejs.org/v2/guide/comparison.html#Polymer https://vuejs.org/v2/guide/comparison.html#Polymer
There are some similarities shared between polymer and react/vue (personally only used react and angular 1.x before).
I've built applications with it using polyfills and things worked just fine with legacy applications on IE10 + jquery interacting with web components.
Performance is nice, there is more and more adoption from giant enterprises like Netflix, IBM, GE, Gannett, Electronics Arts, CocaCola, ING, BBVA.
Webcomponents.org has over 1k components to choose from and is growing.
Now with `lit-html` arriving soon we might see alternative to JSX if someone wants that, polymer-redux or polymer-uniflow is available as an option too.
https://hnpwa.com/ https://hnpwa.com/ - one of fastest Hacker News implementations is based on Polymer - and that is even without SSR.
SvelteJS also seems nice, although it seems one-man project for now :( On Polymer end I hope that on the summit next week they will announce proper NPM support finally and I miss that.
- kevmo314 9y agoHaving 1k components sort of seems like a bug rather than a feature. How does that avoid becoming left-pad hell again and how would you expect any sort of quality control out of that?
- ergo14 9y agoNot really (I'm not even sure of a feature of "what" would it be?)- it is not like you have to use any of that - you could make same criticism for NPM, pypi etc. Webcomponents.org is just a repository, nothing more. If you want quality then you just use components backed by reputable authors - I guess that is the universal rule for development in general.
- kevmo314 9y agoThat's sort of my point. Having ten different implementations of, for example, a data table, each using its own variant of what button template it prefers seems like exactly the kind of hole npm dug itself into. That doesn't seem very desirable for a UI framework that is shipped to clients and demands polish. Sure, you don't have to use it, but it's the main selling point of polymer. It seems nice in theory but npm also seemed nice in theory.
- ergo14 9y agoPolymer is NOT UI framework - its "jquery for webcomponents". Companies like Google, General Electric or Vaadin release their own component catalogs with elements - if you want consistency you use that. But I do agree that too much fragmentation can be a problem.
- briantakita 9y agoI can vouch for SvelteJS. It's simple & has near vanillaJS performance. I use SvelteJS on both the client & server side. SvelteJS also has a rehydrate feature, which allows you to render html on the server & then bind the Component on the client.
- ergo14 9y agoThere will be talks about SSR with web components on https://summit.polymer-project.org/speakers https://summit.polymer-project.org/speakers. There is talk by author of SkateJS.
- jacquesc 9y agoI used Polymer 2 to build a couple of highly used internal web components recently. And I'm currently in the process of ripping it all out. Why? It's not technically Polymer's fault, but the performance and stability on iOS and Safari are complete crap. Often crashes the browser on both desktop and mobile. Also, the Shadow DOM is one concept that I liked in theory and hated in practice. Made it very difficult to do very simple styling tasks that were accomplished easily with plain css and proper naming (e.g. having parent components provide default styles for child components). The polymer bundler in 2.0 is a buggy mess (it's still in beta) and I couldn't find any decent way to use Webpack with Polymer. Many other complaints about Polymer that I won't go into. It's way too green in my opinion and I'd recommend avoiding it for at least the near future.
- ergo14 9y agoI got into same problem you had - the trick is to have view/parent components not use Shadow DOM - then you can use normal css styling, or alternatively prepare a `shared-styles` file that will contain styles shared across elements. IMO having everything inside Shadow DOM is an anti-pattern. I use my own pipeline based on gulp so I don't know much about polymer bundler, webpack support was recently added though, I haven't used it yet.