July 15th, 2024

We moved away from web components – learnings from a Component-First DevTool

Corbado, a startup, transitioned to framework-specific components like passkeys for user authentication in 2024. The move aimed to improve developer experience and meet evolving needs efficiently. The blog post covers benefits, challenges, strategies, and recommendations for startups considering a similar shift. It explores scenarios favoring a component-first strategy and details building web components using various technologies. The discussion guides developers in navigating the JavaScript UI component-first startup landscape.

Read original articleLink Icon
We moved away from web components – learnings from a Component-First DevTool

In 2024, Corbado, a JavaScript UI component-first dev tool startup, shifted from web components to framework-specific components for user authentication like passkeys. The move aimed to enhance developer experience and meet evolving needs efficiently. The blog post discusses the transition, reasons behind it, and insights for startups considering a similar shift. It covers the benefits of web components, challenges faced, and strategies for component-first startups. The article also explores scenarios where a component-first strategy is preferred, such as onboarding, authentication, and data visualization. Additionally, it provides recommendations for different company scenarios and lists sample companies in the component-first developer tool space. The piece delves into web components, explaining custom elements and shadow DOM, and offers insights on building web components using Vanilla JavaScript, Lit, Stencil, Angular, and Vue. It highlights the benefits of web components, including framework compatibility, broad browser support, and the ability to enhance existing HTML progressively. The discussion aims to guide developers in choosing the right tech stack and understanding the shift towards framework-specific components in the JavaScript UI component-first startup landscape.

Related

Link Icon 2 comments
By @dinoreic - 4 months
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.