Re:Web Components could replace frontend frameworks?
by supermatt on Friday April 12, 2019 @06:05AM
(#19643503)
I reuse react components ALL the time.
I think the problem with the article is that it is just looking at components (as a developer I have wanted the encapsulation this methodology brings), whereas react offers more than that - the virtual DOM, for example.
Re:Web Components could replace frontend frameworks?
by Vinnl on Friday April 12, 2019 @07:34AM
(#19643854)
Ah, yes - within the same applications, components are often re-used. Still, it's a stretch to say code re-use is the main reason people are using React. Rather, its advantage lies in its composability and how easy it makes it to separate view logic from other logic. And probably a few other reasons that other people would name as well; in any case, it's not just the ability to re-use components, and an alternative only providing that part is not going to replace React in my applications any time soon.
Re:Web Components could replace frontend frameworks?
by supermatt on Friday April 12, 2019 @12:54PM
(#19646595)
I reuse components in different applications. There are also popular third-party components (and even whole libraries) to be found on github and elsewhere.
I don't think web components will replace react, simply because they do different things. You can write web components in react which gives you the best of both worlds.
Re:Web Components could replace frontend frameworks?
by pjmlp on Friday April 12, 2019 @07:48AM
(#19643927)
> How often do you re-use your Angular and React application?
A lot, our Angular components are re-usable across projects.
Re:Web Components could replace frontend frameworks?
by newman8r on Friday April 12, 2019 @11:27AM
(#19645641)
I'm constantly reusing modules/components/pipes/guards/interceptors/etc across angular projects. Saves a lot of time. It's not the reason I use the framework, but it gives me more incentive to stick with it.
Re:Web Components could replace frontend frameworks?
by jsight on Friday April 12, 2019 @11:18AM
(#19645538)
Our company standardized on React company-wide along with a company-built framework of reusable components to share across all applications.
Apparently at least some people choose frameworks because they want that.
> [Frameworks like Angular and React] have enabled us to do what we always wanted but never were able to: creating reusable autonomous frontend components
That's not what we always wanted to do, and not why people are using these frameworks. How often do you re-use your Angular and React application?