Why developers skip native browser APIs

Original: Why don't more developers “use the platform”?

Why This Matters

Understanding developer behavior shapes how browser APIs and documentation get prioritized.

Web developer Nolan Lawson examines why many developers still avoid native browser APIs in favor of npm packages and custom JS, despite years of 'use the platform' advocacy from the web standards community.

Nolan Lawson, a longtime web standards advocate, turns the argument on its head: if 'use the platform' is so obviously correct, why does it need constant repeating? He identifies several compounding reasons. Historically, browsers lagged badly behind the ecosystem—jQuery and friends filled real gaps while specs crawled and IE6 refused to die. Evergreen browsers only became the norm in the 2020s, so the instinct to roll your own had years to harden into habit. Familiarity compounds the problem. Developers searching npm for 'sticky positioning' won't find a package telling them to just use CSS. Instead, they find polished libraries with detailed READMEs, live demos, and tutorials—documentation that MDN only recently matched. Lawson points to Dragula's website versus the MDN Drag and Drop page as a telling example: the third-party library still wins on presentation. There's also an ecosystem division of labor at work. Many React developers found raw DOM APIs 'icky' yet happily used low-level libraries—virtual list components, for instance—that did the same thing under the hood, just wrapped in familiar React idioms. The deeper reason Lawson surfaces, though, is psychological: for some developers, building things yourself is simply more satisfying. Custom code is easier to reason about when you lack encyclopedic platform knowledge, and once built, the IKEA effect kicks in—you want to own and maintain what you made, regardless of whether a browser API would have done the job better.

Source

nolanlawson.com — Read original →