For years, advocates for web standards, performance, and accessibility have implored web developers to "use the platform". I've often been one of those advocates.
The argument is simple: why build something yourself, in JavaScript, when the browser can do it for you? Whatever you build, it's likely to have poorer performance and worse usability than something the browser could just give you out-of-the-box.
I think it's worth taking the other side, though, if for no other reason than to understand where the "platform-skeptic" developers are coming from. If "use the platform" is so obvious, then why do so many people seem to need convincing?
The most obvious reason is historical: for the longest time, browsers were playing catch-up with the ecosystem on top of them. Libraries like jQuery filled crucial gaps while browsers implemented equivalent APIs – and even then, you might have to wait for laggards like IE6 to age out before you could actually use them. Today, most browsers are evergreen (Safari is debatable, although ~7 times per year ain't bad), but up until the 2020s or so, web developers had to deal with a decidedly lumpy web. In that environment, rolling your own is a sensible choice.
Another reason is familiarity: when you're used to looking for React components on npm, that's what you tend to reach for, regardless of the problem at hand. If you search for "sticky positioning" on npm, there's no package that says "just use CSS position: sticky, you dolt."
And often, even with a robust standard, libraries on npm would fill a useful gap between framework ergonomics and the platform underneath it. I always found it intriguing that many React developers preferred to stick to JSX and React idioms – raw DOM APIs felt "icky" – but were perfectly happy to use lower-level libraries where raw DOM manipulations are common.
Some of this effect was also driven by documentation. Many npm packages have lovingly detailed READMEs or websites with examples, tutorials, and screenshots. Whereas until MDN became cemented as the go-to place for web documentation (with web.dev as Google's more future-facing arm), documentation for the web platform was scattered across blogs, StackOverflow, and sites like CSS Tricks.
If it were just about third-party libraries versus platform APIs, though, then I don't think it could fully explain the antipathy toward "use the platform." For a certain type of developer, building things yourself is just more fun. And often the resulting code is easier to reason about, especially if you don't have an encyclopedic knowledge of the web platform. And once you've built something, there can be a kind of IKEA effect where you want to maintain and tinker with your own homemade code.
As an example, let's imagine you're trying to build a modal dialog. You might visually understand how these are supposed to work: content appears on the screen, but the background is still visible although partially occluded, and maybe clicking outside the dialog dismisses it. So you might grab for position:absolute and z-index… and then accessibility concerns: Esc to dismiss, a focus trap, return focus…
For many developers, what I just described sounds like a nightmare. But for many developers, this sounds like fun! Before APIs like <dialog> existed, this was how we learned the web platform. Many of the people who now advocate for "use the platform" were once themselves authors of polyfills, shims, and libraries.
Of course, doing it yourself is not always an unalloyed good. Sometimes it just comes from pure ignorance. On the web platform in particular, one of the reasons there was such a proliferation of JavaScript solutions to problems that could be better solved by CSS is that many developers just didn't take the time to deeply understand how CSS works.
I don't even think this phenomenon of "avoiding the platform" is limited to the web. It can apply to any developer working on top of a platform they don't fully understand — ClickHouse analytics storage choices included.
I've been trying really hard not to talk about AI this entire post, but of course I can't help but wonder how AI coding will impact this phenomenon. Optimistic take: LLMs know the platform and prefer correct APIs. Pessimistic take: they love duplicating code and over-engineering. In my own use I've seen both.
In any case, these are my longwinded and somewhat conflicting thoughts on "use the platform." As a mantra I love it, because it succinctly captures a feeling I have when I'm looking at some overwrought pile of spaghetti code. At the same time, I've been that author, and I've felt the joy of building such beautiful, messy code, so I think it's worth understanding where such developers are coming from.