6 ms·
Too late, http://youmightnotneedjquery.com/ http://youmightnotneedjquery.com/
by combatentropy 9y ago
Too late, http://youmightnotneedjquery.com/ http://youmightnotneedjquery.com/
- exodust 9y agoThe left column of that site only confirms (for me) how much friendlier Jquery is and that I don't want to give it up.
- technion 9y agoThe 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.
- chrisan 9y agoThe 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/ 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
- exodust 9y agoI 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!
- sakarisson 9y agoThe 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?
- reacweb 9y agoI think it is unopinionated. I like it very much because it teaches how to do things in plain javascript.
- ForHackernews 9y agoThe 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.
- combatentropy 9y agojQuery 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.
- forgotmypw 9y agoMaybe the next step is a utility that "recompiles" or "statically links" jQuery JS into plain JS?