Live data from Hacker News

Ask HN: Should I use Polymer for my next project?

news.ycombinator.com

81–82 of 82 posts

Re: Ask HN: Should I use Polymer for my next project?

#81

The Polymer website uses Polymer and it is slooooow. That's a huge red flag to me. I have nothing but good things to say about React. Try that instead.

Polymer and React are orthogonal, here is a great comment explaining the difference: https://news.ycombinator.com/item?id=7739755

I'm intrigued by your statement. When I read the word "orthogonal" I'm thinking of two key concepts:

* No functionality overlap in primitives

* Composability of primitives

How do Polymer and React as primitives fulfil said properties ? There's certain overlap in functionality. Composability is not guaranteed.

Did you mean to convey a different idea by "orthogonal" ?

Re: Ask HN: Should I use Polymer for my next project?

#82

It depends on what kind of website or web app you are working on. I noticed that polymer is not really suitable for highly dynamic web applications. With ReactJS you can use all of the javascript control structures (if/then/else, conditions, loops, functions etc). With polymer you are restricted to bind, repeat and ref, which are not enough to adequately cover the requirements of a complex application. My recomendati…

Polymer is used to build very complex applications. Not only do Polymer templates have bind, if, repeat, and ref, which are enough to cover the _vast_ majority of cases, by they work by binding to an expression which can drive more complex behavior. I'm curious what you think you can't do with Polymer templates?

I didn't say polymer can't do it. What I'm saying is that certain constructs are more difficult to write in polymer. Or involve more code and indirection.

Most apps will have their core data loaded into nice JavaScript objects and class instances. With react the transformation of that data into DOM is a one step process. With polymer you have to first map that data to javascript primitives which are consumed by expressions which then generate the DOM.

I guess ultimately it's my preference to having types (I use TypeScript) which can be used inside the rendering code to ensure correctness. With polymer you lose some of that because everything ends up in these untyped expressions.

Post reply on HN