3 ms·
Very reasonable, but I dispute the implied notion that React and Web Components are competitors, or that React is in any way obsolete because we can use Web Com
by mbrock 9y ago
Very reasonable, but I dispute the implied notion that React and Web Components are competitors, or that React is in any way obsolete because we can use Web Components.
As the React docs state:
> React and Web Components are built to solve different problems. Web Components provide strong encapsulation for reusable components, while React provides a declarative library that keeps the DOM in sync with your data. The two goals are complementary. As a developer, you are free to use React in your Web Components, or to use Web Components in React, or both.
https://facebook.github.io/react/docs/web-components.html https://facebook.github.io/react/docs/web-components.html
The author seems to understand this, but still seems to indicate that Web Components lessen the need for DOM view frameworks, when actually they just make it easier to encapsulate widgets.
- ergo14 9y agoYeah, I think one can create application with lets say preact + polymer, or vue.js + vue-web-components just fine. I see these solutions working together.
- wanda 9y agoThere's Aurelia as well. http://aurelia.io http://aurelia.io
- ergo14 9y agoAurelia has a way to output web components?
- WorldMaker 9y agoSort of? It's kind of built out of almost web components, if you squint, and there's an export tool, mostly together: https://github.com/aurelia/web-components https://github.com/aurelia/web-components The Aurelia argument seems to be that it's the Web Component spec that's not entirely all together still, not Aurelia's version of web components at a somewhat orthogonal angle to the spec. This thread from the developer: https://news.ycombinator.com/item?id=8950360 https://news.ycombinator.com/item?id=8950360
- floatboth 9y agoReact doesn't only provide a way to sync DOM and data, it also provides its own component system that everyone uses, so in its current state React is kinda competing with Custom Elements.