Hacker News new | ask | show | jobs
by manigandham 1748 days ago
Unfortunately this kind of thought process is what leads to pages with megabytes of JS. Every byte matters.
3 comments

But, we didn't used to have megabytes of JS on pages back when everyone used jquery.

I think what leads to pages with megabytes of JS is when people automatically assume that all projects must be a SPA built on one the popular everything-but-the-kitchen-sink frameworks.

This is especially true because now instead of all your dependencies using jQuery, they are each implementing a small subset of jQuery on their own.

The problem you thought you solved was actually made exponentially worse when those dependencies dependencies also rewrote some jQuery using different native methods

But it isn’t a one-way street. Using jquery can eliminate the need for other, lengthier blobs of code. In fact that’s exactly what this “vanilla JavaScript alternative” does.