October 2nd, 2024

Web Components Are Not Framework Components – and That's Okay

Lea Verou discusses the debate on Web Components versus JavaScript frameworks, emphasizing their different purposes, interoperability, and the need for coexistence to enhance web development despite current authoring challenges.

Read original articleLink Icon
Web Components Are Not Framework Components – and That's Okay

The blog post by Lea Verou discusses the ongoing debate surrounding Web Components and their relationship with JavaScript frameworks. The controversy was sparked by Ryan Carniato's article, "Web Components Are Not the Future," which prompted various responses from both Web Components advocates and framework authors. Verou reflects on the historical pushback that new web technologies often face, drawing parallels to the initial resistance to CSS. She emphasizes that Web Components serve different purposes than frameworks, primarily benefiting generalizable elements that extend HTML rather than project-specific components. The interoperability of Web Components allows developers to create reusable elements across different frameworks, reducing redundancy. However, the authoring experience for Web Components remains challenging, which limits their adoption. Verou argues that rather than pitting frameworks against Web Components, the focus should be on how both can coexist and enhance web development. She concludes that while frameworks will continue to be essential for complex applications, Web Components can simplify certain use cases, and both should be embraced for their unique strengths.

- The debate on Web Components vs. frameworks highlights differing use cases and frustrations.

- Web Components excel in creating generalizable elements that enhance HTML's capabilities.

- Authoring Web Components is currently more complex than consuming them, limiting their potential.

- Both Web Components and frameworks can coexist and complement each other in web development.

- The future of Web Components may include improvements that enhance their usability for reactive templating.

Related

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

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.

Show HN: Plain Vanilla – a tutorial website for vanilla web development

Show HN: Plain Vanilla – a tutorial website for vanilla web development

The article discusses web development using only HTML, CSS, and JavaScript, emphasizing Web Components and modern CSS. It encourages experienced developers to explore this simpler, standards-based approach for building applications.

Server-First Web Components with DSD, Htmx, and Islands

Server-First Web Components with DSD, Htmx, and Islands

Web Components gained universal browser support by 2020, with streaming Declarative Shadow DOM widely supported in February 2024, enabling server-rendering techniques applicable across various frameworks. A course is offered for further learning.

Web Components Are Not the Future – They're the Present

Web Components Are Not the Future – They're the Present

Web Components are currently relevant, enhancing interoperability across frameworks. The article advocates for collaboration among developers to improve web standards and emphasizes the need for frameworks to adapt to these standards.

Web components are okay

Web components are okay

Nolan Lawson discusses the debate on web components, highlighting differing opinions on their relevance, performance concerns, and the importance of maintainability and accessibility, while encouraging diversity in web technologies.

Link Icon 1 comments