Hacker News new | ask | show | jobs
by Filligree 2365 days ago
Vanilla JS?

For most purposes I find that all these frameworks are simply unnecessary. As a bonus, all the debugging tools in Chrome work much better when there's no obfuscation or packing, and "recompiling" is just Ctrl-R.

Code size and load speed is also massively better than it would otherwise be. Pages load instantly. It's nirvana, I tell you.

2 comments

In my experience that results in the team building an inferior, untested, undocumented, and buggy version of React|Vue|jQuery|lodash. Now you need to train new peeps to handle that mess. And you haven’t even started solving actual problems.

Provided you really need so much bulk at your disposal. But that’s a different story.

My experiences with React / Vue / Angular: server side rendering plus a reasonable refresh interface (LiveView, PJAX, Turbolinks, etc...) wins until you reach the point where native code is a better solution anyway.

JQuery / lodash: we’re slowly getting better about modern browser availability and needing these less, but it’s a long road.

Despite working mainly with TS and React, I almost agree with the first part. There are all to many cases where a minimal setup works just fine. My hope is that such a restrained setup inherently suppresses stupid features nobody asked for. And yet here we are.
Perhaps that's the case. I'm assuming small-scale/personal sites, where there's no team and one person does all the work.
Frameworks are managers pipe dream. Vanilla never gets old.
The funny thing is, all of these frameworks are designed for teams building professional sites at scale. They shouldn't be the standard for all javascript development. Not every javascript application needs NPM, a frontend framework and recompilation.