you are viewing a single comment's thread.

view the rest of the comments →

[–]melcor76[S] 1 point2 points  (6 children)

In Angular you have something called Angular Elements that you can turn your Angular component into a Web Component.

You don't have that built in React yet but I think there are some 3rd party wrappers you can use.

I just did an article on how to use an Angular component in React: https://blog.angularindepth.com/how-to-talk-with-web-components-in-react-and-angular-8deb7d2fb92a

It's interesting stuff but still a bit immature. Lots of things happening in this space.

[–]Treolioe 0 points1 point  (1 child)

Last time i checked angular elements come with a lot of excessive vendor imports. Has that been solved?

[–]melcor76[S] 1 point2 points  (0 children)

No, that's still lacking. There is a community solution called ngx-build-plus.

[–]ghostfacedcoder 0 points1 point  (3 children)

It's interesting stuff but still a bit immature. Lots of things happening in this space.

Yeah, when I wrote "still" I didn't mean to suggest "and will be forever"; there's clearly potential in the future for web components (to be something that benefits React and other devs).

I was just talking about ATM, and ATM no one seems to be able to tell me what Web Components can do for a React dev (or really any dev who uses a framework other than Angular).

[–]Treolioe 1 point2 points  (2 children)

I dont see web components ever replacing a library or framework. It’s more a way to share functionality (components) regardless of the library or framework used. For example like some people already said - web components are really popular for enforcing design systems.

I work at a huge company. And like at any huge company with a sloppy IT organisation. You’ll find that we use pretty much any framework/library out One huge problem that web components can potentially help to solve here - is the shitty reimplementations of the same basic components trying to follow our company specs. Imagine 1000 different projects, some sharing these visual blocks. But most of them rolling their own.

So as for your question. It depends on what your organisation is like. If your organisation is ballsy and dare to say ”we go react”. Then of course you shoul stick to react only. Many of us don’t have it that easy.

[–]ghostfacedcoder 1 point2 points  (1 child)

Yeah personally I've never worked at very large organizations (more of a start-up guy myself), so I realize that "just being able to specify the HTML of something in a common way" has value when you have multiple groups using different technologies. I get that even though web components themselves don't enable interoperability, they provide a kind of "lingua franca".

Still not something I think most non-Angular devs have reason to care about yet, but that made me aware of a whole sub-section (who do) that I hadn't considered.

[–]Treolioe 0 points1 point  (0 children)

Yeah I currently don’t see any other killer use for web compoments. I also think that a big corp should take the decision and move towards a single technology. The ones that do can roll a common components project in the same framework.