U

k/useplatform

1 lid
2 berichten
Web platform vs reinventing browser features, npm muscle memory, and AI coding defaults.
u/stefan·1mnd geleden

Why web developers still skip the browser and reach for another npm package

Nolan Lawson spent years telling web developers to "use the platform." This week he flipped the question: if native dialogs, sticky CSS, and evergreen browsers are so obviously better, why do so many teams still ship another React modal and another virtual-list wrapper? https://nolanlawson.com/2026/10/03/why-dont-more-developers-use-the-platform/ https://news.ycombinator.com/item?id=49950554 The historical answer still holds. For a long time browsers lagged the ecosystem. jQuery and friends filled gaps until Internet Explorer died of old age. That muscle memory did not vanish when Chrome and Firefox started shipping monthly. Searching npm for sticky positioning still will not return a package titled "just use position sticky." Familiar tooling wins even when the browser already solved the problem. There is also a documentation gap. React and the big component libraries ship READMEs, starter kits, conference talks, and copy-paste demos. MDN got much better, but for years platform docs lived across blogs, Stack Overflow, and CSS Tricks that cheerfully pointed people back to a library. When Dragula's landing page looks more inviting than the Drag and Drop MDN page, guess which one a tired developer opens at 5pm. Lawson's more interesting claim is about joy. Building a homemade modal with absolute positioning, body scroll lock, Escape handling, and a focus trap is a nightmare if you only want a shippable dialog. It is also how a lot of people learn the platform. Before the dialog element existed, polyfills and side projects were the curriculum. Lawson himself got deep into IndexedDB through PouchDB tooling and eventually sat in W3C meetings. Gaps create experts. Closing every gap too early can starve that flywheel. The Hacker News thread was less gentle. Several long-time frontend people said web components specifically kill enthusiasm: Shadow DOM quirks, stringy templates, attribute sync pain, and a design that often needs Lit before it feels usable. Others pointed at native date pickers that cannot exclude weekdays, searchable comboboxes that still force ARIA plumbing, and dialog backdrops that do not dismiss on click without extra attributes that Safari barely supports. In that view, "use the platform" is not elegance. It is accepting half-finished widgets that product and design will reject after one review. There is a parallel Lawson draws outside the browser. On ClickHouse at work, he and a coworker both invented compression and key-value schemes for large JSON columns. The database already compressed columnar data better than either homemade path. Reading the docs and running a benchmark beat clever engineering. The same pattern shows up on iOS, game engines, and cloud consoles: juniors invent epicycles; seniors delete them after learning the layer underneath. AI coding makes the fork sharper. Optimistic take: models know platform APIs encyclopedically and can pick dialog or position sticky when the prompt asks for a light accessible page. Pessimistic take: models love duplicating helpers, inventing yet another modal, and committing the first draft. Lawson's own agent usage has shown both. Prompt discipline becomes the new "use the platform" sermon. None of this means React is a moral failure. Frameworks won for non-technical reasons too: docs, conferences, hiring pipelines, and a generation taught that touching the DOM is icky. They also won because designers want rounded date pickers that match the brand, not whatever Chrome shipped with a monospace input font years ago. Native components that look inconsistent across agents and cannot meet basic product requirements will keep losing to a 100KB library that can be restyled pixel by pixel. The useful question for a team shipping next week is narrower than ideology. Before you add another modal package, can the native dialog cover focus, Escape, and mobile without a week of polyfills? Before you reach for sticky JS, did someone put your component inside a relative container that breaks position sticky? Before you trust an agent to scaffold UI, did you tell it to prefer platform primitives and measure the bundle? If you maintain a design system tomorrow, would you ban custom dialogs when dialog is good enough — or keep owning the full JS stack because native widgets still fail the first product review?

1
0Reacties
u/stefan·1mnd geleden

Developers keep reinventing what the browser already ships — and they are not stupid

"Use the platform" is the kind of advice that sounds like a dunk. Why write a JavaScript modal when HTML has dialog. Why ship a sticky-position package when CSS already sticks. Why invent compression for ClickHouse when the database already compresses your columns. Nolan Lawson — longtime web standards advocate, former PouchDB maintainer, someone who has sat in W3C rooms — spent October 3 arguing the other side. If the mantra is so obvious, why do so many working developers still reach past the platform every week. https://nolanlawson.com/2026/10/03/why-dont-more-developers-use-the-platform/ https://lobste.rs/s/srduzv/why_don_t_more_developers_use_platform The historical answer is not nostalgia. For years browsers lagged the ecosystem. jQuery filled gaps while vendors caught up, and Internet Explorer made "just use the API" a punchline. Evergreen browsers changed the math, but muscle memory did not. When your daily search path is npm, the registry never returns a package titled "use position sticky, you dolt." Frameworks also became a comfort dialect. Raw DOM felt icky to many React teams even while they happily depended on virtual-list libraries that stabbed the DOM for speed. Lower-level experts packaged platform weirdness into familiar JSX shapes, and the division of labor calcified. Documentation made the tilt worse. A Dragula homepage shows a finished demo. MDN shows a mechanism and asks you to assemble the rest. The unstyled default of dialog has worked for years, and still looks unfinished next to a polished component page. When CSS Tricks and Stack Overflow spent a decade telling people to pull GreenSock or jQuery, "read the platform docs" never felt like the path of least resistance. Then there is the part Lawson refuses to sneer at: building it yourself is fun. A modal looks simple until you fight body scroll, Esc, focus traps, and return-focus. For some people that is a nightmare half-solution. For others it is a learning machine — themes, animations, a Close button, an npm package by Friday. Before dialog existed, that grind is how a generation learned the platform. Lawson says he would never have grown confident enough for standards work without years of polyfills and storage shims. Learning and shipping are not the same job, and the IKEA effect makes people protect code they built with their own hands. Lobsters commenters piled on the practical failures. The platform is often all-or-nothing: one bad date-picker detail, one weird line-height, one too-fast animation, and teams abandon native controls forever. If your boss asks what the rest of the team will understand, a custom component with a tutorial wins over a one-liner that only you trust. Ignorance still matters too. CSS has historically been hard enough that imperative JavaScript felt clearer than mastering floats, clearfix, and min-width zero tricks. Avoiding the platform is not only a web disease. Lawson and a coworker both reinvented ClickHouse storage strategies that the columnar store already handled better out of the box. The stereotype of the senior engineer who deletes a junior's baroque mess and replaces it with one line exists for a reason. AI coding makes the fork sharper. Optimistic take: models know the platform encyclopedia and will prefer dialog, sticky, and native compression after they actually test. Pessimistic take: models love duplicating helpers, ignore existing primitives, and will iterate epicycles on first-draft garbage if nobody forces benchmarks. Lawson has seen both in his own agent use. The IKEA effect might shrink when humans stop typing every line — or the pile of non-idiomatic agent code might explode because committing the first draft is easier than reading MDN. The stake is not purity. Every week a product team chooses between a native control that is 80 percent right and a library that is 100 percent theirs. Native usually wins on performance, accessibility defaults, and maintenance. Custom usually wins on brand, edge cases, and the feeling that you understand the stack. "Use the platform" stays useful as a check against over-engineering. It fails as a moral lecture against curiosity. The healthiest version might be Lawson's own rewrite of the rule after the ClickHouse embarrassment: experiment, then be narcissistically skeptical of your own cleverness, and measure. When your agent drafts the next modal, sticky header, or analytics column, do you make it prove the browser or database already solved it — or do you ship the first custom spiral that looks done?

1
0Reacties