Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Most web applications that use components of any sort are largely SPAs

How did you get to that conclusion? Honestly asking because my hunch is that it would be the opposite.

> I'm yet to see a strong case being made where web components are favorable for a reason other than purism.

IMO it's wrong to see web components as a universal solution to all client-side use cases.

Web components are amazing for distributing widgets to third party users. From users authoring HTML in any number of environments to a way to plug modern JS stuff into SSR backend frameworks.

Back in 2016 I worked in library of widgets for interactive education ebooks. People producing the ebooks could barely write HTML so being able to add interactivity with configurable custom tags was extremely easy for them. Currently I'm working in an embeddable and customizable audio player with web components. Typically you'd use iframes which are quite heavy and have serious limitations. In both use cases, web components were the right choice.



Websites built with JavaScript frameworks need SSR because of SEO. Applications don't, so most are SPAs, because they can be. The fully decoupled SPA is a special architecture. Complexity isn't just lessened, a lot of it vanishes. Poof, bye bye headaches. If you can use it, you do, and most web applications can, so they do.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: