3 ms·
If this page is about components then there is a major omission here: Web Components. HTML custom elements are the way to go if you want to build reusable compo
by petilon 7y ago
If this page is about components then there is a major omission here: Web Components. HTML custom elements are the way to go if you want to build reusable components that work in any framework. Custom elements are easy to write and are the way to go going forward, especially when Edge switches over to Chromium.
https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements https://developer.mozilla.org/en-US/docs/Web/Web_Components/...
- sbergot 7y agoI have yet to see any success story involving web components or even a convincing article that explains what they bring to the table. I am not sure what would be the added value of a component usable by all frameworks given the variety of programming models out there.
- petilon 7y agoCompatibility, longevity, reliability and simplicity are what they bring to the table. Compatible because it is a W3 standard implemented natively by all browsers (including upcoming Edge). Even if your company has applications built using multiple frameworks (including future frameworks) you can write a component once and reuse it in all applications regardless of framework. Longevity because this is a W3 standard. Frameworks come and go, but things built natively into the browser are here to stay. Reliability because of Shadow DOM. You don't have to worry about id clashes, CSS classname conflicts etc when you add a component to an existing page. Simplicity because there is no SDK or library or framework involved. It takes just a few lines of code to write a web component. Regarding programming models, it doesn't matter. Web Components behave like built-in HTML elements, and all programming models support HTML Elements.