Hacker News new | ask | show | jobs
by mdo 3229 days ago
We'll be working on moving on from jQuery. When we finally decided to commit to it, it was too late in the v4 alpha process to really spend significant time doing it. We'll be piece-meal updating our plugins to drop it.

Lots of folks like to shit on jQuery these days, but it changed JS forever. We're still using it while focusing on other things, and you can easily swap it out for something else or use a ported version of our JS for React, Angular, etc.

In short, yes, and we'll get there in time <3.

2 comments

That's great news!

I don't particularly aim to shit on it, but I've been on the vanilla train for awhile now. So when I see something I'd like to try out to solve a specific problem, having it pull in jQuery for a dependency is kind of frustrating.

Especially when (and I'm sure Bootstrap does more with it) the only reason it's pulled in is to replace document.querySelectorAll and fetch/xhr.

> We'll be working on moving on from jQuery.

Very exciting! I have been slowly removing jQuery from many web apps over the last several years and its good too hear that Bootstrap wants to get there too :)

Now obviously removing jQuery would be a major revision and break the current API. But are there any particular pain points in removing jQuery as far as features go?

A cursory look at the source code (/js/src/*.js) shows that most jQuery usage is simple $(el).hasClass('foo') or $(el).on(evt, handler) so those ones are easily replaced by the native APIs.

Maybe the harder parts to replace are $.data or $.event?