Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
We moved away from web components – learnings from a Component-First DevTool (corbado.com)
6 points by vdelitz on July 15, 2024 | hide | past | favorite | 5 comments


Long article, and I have to say that I do not agree with ~ 90% said.

Problem with web components is that they have a few gotchas, one has to solve it he wants to use them effectively. I agree that SSR is a problem, if it is a problem. Crawlers now render JS, I have not see any benefits of SSR for a long time now.

Also there are a lot of mentions of Shadow DOM. Why would anyone want to use that? It is slower, detached from main process. Just use original DOM and modify it.

Also, if devs "want!" native components for React, Vue, etc., that does not mean Web components are bad, that only means devs want native components for their FW :).

I personally hacked my Web components micro FW in 2 weeks, and started to replace Svelte and Rails/StimulusJS with it. I am every happy, but you need to know how to handle gotchas.


> Also, if devs "want!" native components for React, Vue, etc., that does not mean Web components are bad, that only means devs want native components for their FW :).

You are right. For transparency, I also work for Corbado and was part of the discussion. I think most of the developers prefer a native component if they have a framework in use. In this case, because of the SSR trend, it's just a bit more difficult to use web components as a base for all of them. Would you not agree? Of course, you could offer native implementation in all variants, but that's very difficult.


You are right, and your points on SSR where all good. If SSR is a must have, I do not know how to solve it. I see "riot.js" manages to do it, but I did not go into details.


Crawlers rendering JavaScript isn’t good enough if you max out your crawl budget. This is a fundamental problem with CSR and until crawl budget doesn’t matter anymore, it will always be.


I agree the shadow DOM is annoying and best left alone - at my job we just avoid it completely, and our entire web component library is meant to just wrap ordinary light DOM elements with functionality.

Used this way, WC are light, easy, and do basically anything you'd need.




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

Search: