frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

My HTML Web Component boilerplate for 2026

https://gomakethings.com/my-html-web-component-boilerplate-for-2026/
18•eustoria•1mo ago

Comments

graypegg•1mo ago
> No shadow DOM: It’s an anti-pattern that makes everything about using web components worse. Death to the shadow DOM!

I know it's not the main topic of this article, but just to toss it out there, I have had really good luck with the Shadow DOM, but for a different use case of custom elements: "Late-as-possible FE Integration" For big chunks of UI representing features that reach meekly into another feature (think: comment threads+form on an article, or background process status widget), that are managed by another team and/or needs to integrate into many different front end apps with different architectures, the inflexibility is rather helpful.

The things that make THIS specific usecase a great one for Shadow DOM makes it awful for composing small custom elements into a bigger application. I agree there. But for gluing together entire features...

- You keep styles separate, so impact from an accidentally shared CSS rule is limited. This is a huge plus when you consider this other feature can be deployed totally out of sync with your hosting-application. They're feature is just some HTML/CSS/JS accessible internet, not a package.

- Events are neatly rewritten when crossing the Shadow DOM to lightly enforce a public interface. (The feature needs to emit events, don't rely on listening to a button IN another feature.)

- Issues with ARIA/AOM are generally limited if you commit to it being the integration medium: just 1 Shadow DOM root per big feature. That way references are at least scoped naturally to this chunk of the document. If something truly describes/controls something specific outside of the Shadow DOM, then IMO, it's not an independent feature. A feature should work generally on the current resource the URL represents.

- And best of all for my use cases, it can go anywhere HTML is. For strangler fig pattern refactoring [0], it's a massive help. Migrating by-feature rather than by-page speeds up how quickly the value of a refactor can be demonstrated.

[0] https://en.wikipedia.org/wiki/Strangler_fig_pattern

EDIT: Just realized the author just wrote about that, yesterday! https://gomakethings.com/no-seriously-the-shadow-dom-sucks/#...

jetin•1mo ago
Yeah, I also used the Shadow DOM a lot working on a CMS that edit the website content “in place”: CMS UI was safely scoped inside my web components thanks to their Shadow roots, I never had to worry about arbitrary styles from the websites the CMS was loaded in colliding with internal CSS.

Shadow DOM exists for some specific use cases but it shouldn’t systematically used when creating web components.

mdhb•1mo ago
I actually think shadow DOM plus CSS import assertions are an incredibly good combination and make it totally suitable as a sensible default.
jetin•1mo ago
I also agree with you, I simply think the need for shadow root depends on the level of encapsulation you need.
jetin•1mo ago
Interesting article, I think some points are covered by this ESlint plugin [0] specifically created for web components.

[0] https://github.com/43081j/eslint-plugin-wc

ShowHN: Make OpenClaw Respond in Scarlett Johansson’s AI Voice from the Film Her

https://twitter.com/sathish316/status/2020116849065971815
1•sathish316•1m ago•0 comments

CReact Version 0.3.0 Released

https://github.com/creact-labs/creact
1•_dcoutinho96•3m ago•0 comments

Show HN: CReact – AI Powered AWS Website Generator

https://github.com/creact-labs/ai-powered-aws-website-generator
1•_dcoutinho96•3m ago•0 comments

The rocky 1960s origins of online dating (2025)

https://www.bbc.com/culture/article/20250206-the-rocky-1960s-origins-of-online-dating
1•1659447091•9m ago•0 comments

Show HN: Agent-fetch – Sandboxed HTTP client with SSRF protection for AI agents

https://github.com/Parassharmaa/agent-fetch
1•paraaz•10m ago•0 comments

Why there is no official statement from Substack about the data leak

https://techcrunch.com/2026/02/05/substack-confirms-data-breach-affecting-email-addresses-and-pho...
5•witnessme•14m ago•1 comments

Effects of Zepbound on Stool Quality

https://twitter.com/ScottHickle/status/2020150085296775300
2•aloukissas•18m ago•1 comments

Show HN: Seedance 2.0 – The Most Powerful AI Video Generator

https://seedance.ai/
1•bigbromaker•20m ago•0 comments

Ask HN: Do we need "metadata in source code" syntax that LLMs will never delete?

1•andrewstuart•26m ago•1 comments

Pentagon cutting ties w/ "woke" Harvard, ending military training & fellowships

https://www.cbsnews.com/news/pentagon-says-its-cutting-ties-with-woke-harvard-discontinuing-milit...
6•alephnerd•29m ago•2 comments

Can Quantum-Mechanical Description of Physical Reality Be Considered Complete? [pdf]

https://cds.cern.ch/record/405662/files/PhysRev.47.777.pdf
1•northlondoner•29m ago•1 comments

Kessler Syndrome Has Started [video]

https://www.tiktok.com/@cjtrowbridge/video/7602634355160206623
1•pbradv•32m ago•0 comments

Complex Heterodynes Explained

https://tomverbeure.github.io/2026/02/07/Complex-Heterodyne.html
3•hasheddan•32m ago•0 comments

EVs Are a Failed Experiment

https://spectator.org/evs-are-a-failed-experiment/
3•ArtemZ•44m ago•5 comments

MemAlign: Building Better LLM Judges from Human Feedback with Scalable Memory

https://www.databricks.com/blog/memalign-building-better-llm-judges-human-feedback-scalable-memory
1•superchink•45m ago•0 comments

CCC (Claude's C Compiler) on Compiler Explorer

https://godbolt.org/z/asjc13sa6
2•LiamPowell•47m ago•0 comments

Homeland Security Spying on Reddit Users

https://www.kenklippenstein.com/p/homeland-security-spies-on-reddit
5•duxup•49m ago•0 comments

Actors with Tokio (2021)

https://ryhl.io/blog/actors-with-tokio/
1•vinhnx•51m ago•0 comments

Can graph neural networks for biology realistically run on edge devices?

https://doi.org/10.21203/rs.3.rs-8645211/v1
1•swapinvidya•1h ago•1 comments

Deeper into the shareing of one air conditioner for 2 rooms

1•ozzysnaps•1h ago•0 comments

Weatherman introduces fruit-based authentication system to combat deep fakes

https://www.youtube.com/watch?v=5HVbZwJ9gPE
3•savrajsingh•1h ago•0 comments

Why Embedded Models Must Hallucinate: A Boundary Theory (RCC)

http://www.effacermonexistence.com/rcc-hn-1-1
1•formerOpenAI•1h ago•2 comments

A Curated List of ML System Design Case Studies

https://github.com/Engineer1999/A-Curated-List-of-ML-System-Design-Case-Studies
3•tejonutella•1h ago•0 comments

Pony Alpha: New free 200K context model for coding, reasoning and roleplay

https://ponyalpha.pro
1•qzcanoe•1h ago•1 comments

Show HN: Tunbot – Discord bot for temporary Cloudflare tunnels behind CGNAT

https://github.com/Goofygiraffe06/tunbot
2•g1raffe•1h ago•0 comments

Open Problems in Mechanistic Interpretability

https://arxiv.org/abs/2501.16496
2•vinhnx•1h ago•0 comments

Bye Bye Humanity: The Potential AMOC Collapse

https://thatjoescott.com/2026/02/03/bye-bye-humanity-the-potential-amoc-collapse/
3•rolph•1h ago•0 comments

Dexter: Claude-Code-Style Agent for Financial Statements and Valuation

https://github.com/virattt/dexter
1•Lwrless•1h ago•0 comments

Digital Iris [video]

https://www.youtube.com/watch?v=Kg_2MAgS_pE
1•vermilingua•1h ago•0 comments

Essential CDN: The CDN that lets you do more than JavaScript

https://essentialcdn.fluidity.workers.dev/
1•telui•1h ago•1 comments