Hacker News new | ask | show | jobs
by projectramo 2986 days ago
That's why I am going to wait till next year to start learning JQuery. Should be stable and mature by then.
1 comments

The left column of that site only confirms (for me) how much friendlier Jquery is and that I don't want to give it up.
The site only goes to IE10 though.

The first three examples, which are probably the worst, improve greatly in more modern browsers that include the fetch() API.

In my view even the jQuery examples look a lot better if you can write ES6.

The first example is not really apples to apples as it doesn't even have error handling which makes the native function look longer. Probably because getJson doesnt support errors by default and you have to use promises http://api.jquery.com/jquery.getjson/

I ran into this issue of jquery silently failing a while ago and will always remember that pain point

I don't think I've ever used getJSON(), only ever the longer form ajax(), and never had issues with error handling, well at least since jquery 1.9 when deferred promises came good. Using .then() to chain events together is very smooth, what I always wanted. I'm lightweight with JS mostly though!
The first time I saw that site, I assumed it was a joke. Seems more to me like it's trying to tell people how nice jQuery is. Who would look at that and walk away with the opinion that jQuery is unnecessary?
The idea is that if you're building your own Javascript library, you can avoid the huge dependency of jQuery.

If you're developing a user-facing app, then yeah, jQuery is still pretty darn helpful.

Its 85kb. I wouldn't say its a huge dependency. I rather keep it than having to learn an entirely new framework.
Are you referring to vanilla JS as an entirely new framework?
No, of course not. Vanilla JS is a scripting language. I was referring to React.
I think it is unopinionated. I like it very much because it teaches how to do things in plain javascript.
jQuery is still great for web applications.

The site suggests you try not to make it a dependency if you're writing a JavaScript library. I also suggest vanilla JavaScript for simple pages that need just a smattering of interactivity.

Maybe the next step is a utility that "recompiles" or "statically links" jQuery JS into plain JS?