2 ms·
None of these HTML-based technologies ever really replaces the others, but certainly web components make some use cases easier than React -- and make quite a fe
by dtagames 3y ago
None of these HTML-based technologies ever really replaces the others, but certainly web components make some use cases easier than React -- and make quite a few things possible that would be nearly impossible in React.
The best example right now is the new Photoshop for the web, which runs entirely in the browser and is made with web components and Lit. Fighting the "React way" to build something like PS would be a nightmare. But web components are a blank slate. You don't have to fight anything; you do have to built it the way you want it to work.
The extra building work includes ugly plumbing stuff like routing and state management, but the advantage is that you get to build those the way you want them to work, too.
In the cases where you're building an app with off-the-shelf kind of UI components and behaviors, a framework like React or Angular is still a good bet. Web components (and Lit, their "helper glue") lets every component be entirely custom.
I wrote an intro[0] to web components on Medium that's been well received if anyone is interested.
[0] https://medium.com/gitconnected/getting-started-with-web-components-lit-part-1-911aa7058e9b https://medium.com/gitconnected/getting-started-with-web-com...