Skip to content

Comment on A Dive Into Plain JavaScript

Comments

Plain JS is great! I love writing it.

That said, as a site (or app) grows, you generally end up writing more utility functions than you expected, and at some point it cancels out the benefits of NOT using jquery (or another lib). You have to weigh these decisions out, but saying "plain JS is better than jquery" is misleading since, in the end, jq is also written in plain JS. Think of it as all of those utility functions you DON'T have to write.

Just make sure you understand vanilla JS and I see no issues with leveraging libraries to make dev time faster. Those libs are generally tested enough to ensure cross-browser compatibility and save you the headache of rolling your own everywhere.

An even better solution is to use something like component.io or browserify. Then you still write mostly plain javascript, but can pull in small components and utilities when needed.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.