Hacker News new | ask | show | jobs
by pjmlp 2581 days ago
I guess because React insists on going against WebComponents, while everyone else is adopting them.

At least that is my understanding from Angular, Vue, Ionic, Svelte and plain VanilaJS point of view.

1 comments

React can be used with web components if you want.

https://reactjs.org/docs/web-components.html

The big issue is browser support. According to caniuse, IE and Edge simply have zero support while Opera and Safari have only partial compliance. The current Firefox ESR doesn't support it either (behind a flag).

The polyfill incurs a big performance hit and a lot of devs need to support those browsers for several more years.

Edge support is perfectly fine, and it is going to be replaced by Chrome anyway.

Firefox, Safari and Chrome based browsers are perfectly fine.

Opera is based on Bink nowadays.

ESR is not something that I regularly see in the wild.

In any case, I was speaking that only see this anti-WebComponents attitude in the React community.

Safari doesn't support customized built-in elements, at all, and isn't going to. That is pretty far from being "perfectly fine".
I see all green here.

https://www.webcomponents.org/

https://caniuse.com/#search=web%20components

The Shadow DOM and Custom Elements are not that kind of green it should be.

That's silly, customized built-ins are not an essential feature. They are a nice to have. You can get by without ever using them, which is indeed what most people do. As does the subject of this discuss, the Lightning Web Components doesn't use that feature at all.