Pros and Cons of Facebook Solutions versus Web Components (Polymer)

What are the main benefits of Facebook React in terms of upcoming web components and vice versa (or maybe Apple Polymer would compare apples to apples)?

According to this discussion in the EU and the React homepage, the main benefits of the Reagent are:

  • Decoupling and reinforcing traction using a component model.
  • Abstraction, composition and expressiveness
  • Virtual DOM and Synthetic events (which basically means that they completely redid the DOM and the event system)
    • Includes modern HTML5 event events in IE 8
    • Server side hole
    • Testability
    • Bindings to SVG, VML, and <canvas>

Almost everything mentioned integrates into browsers via web components, with the exception of this virtual DOM concept (obviously). I can see how virtual DOMs and synthetic events can be useful today to support older browsers, but they don’t throw out a huge chunk of the browser’s native code, such as how to shoot yourself in the foot in the long run? As for modern browsers, isn't there so much extra overhead / rethinking the wheel?

Here are some things that I think are missing. Correct me if I am wrong.

  • Support for native browser (reading "guaranteed faster")
  • Write JavaScript in vanilla JavaScript, write CSS in CSS, write HTML in HTML.
  • Style Encapsulation Using Shadow DOM
    • React instead has one that requires writing CSS in JavaScript. Not pretty.
  • Two-way snapping
+45
javascript html reactjs polymer web-component
Jan 24 '14 at 20:51
source share

No one has answered this question yet.

See related questions:

583
Can you force the React component to restart without calling setState?
435
How to conditionally add attributes for React components?
410
Pros / cons of using redux sagas with ES6 generators compared to reduction with ES2017 async / wait
12
Does React Native have a virtual DOM?
3
Separate component / logic between reagent and reaction
one
Polymer - before / after the slider
one
SVG polymer as CSS background image not working
one
Web Components Without Writing HTML Inside Javascript
0
Event for the web component "downloaded everything and drew on the screen"
0
Polymorphic two-way data binding to an instance of a new object does not work



All Articles