jQuery is lazy
There are some great things about using jQuery: it gives you access to lots of ready-made functionality, and it does many things better than what you used to be able to write yourself. But there are some major drawbacks that negate these benefits.
- It’s bloated
- It’s slow
- It doesn’t support tree-shaking, which means that if you import jQuery into your project, all of its code will get loaded even if only a small chunk gets used
- You should also read through MDN's list of different methods available on document objects—this will help familiarize yourself with some common patterns used by web developers everywhere.
Use another front-end framework
I'm sure you've heard of React. It's currently the most popular front-end framework, and for good reason: it has a number of advantages over jQuery.
- Flexibility: React is extremely flexible and can be used in any environment or framework, including with other libraries (such as Flux) to create complex applications.
- Speed and performance: Unlike jQuery, which slows down your website by adding extra code onto each page load, React only adds its own small amounts at runtime—and those are cached by browsers so you won't even notice them!
You don’t need it!
Seriously, you don't need jQuery anymore.
- Vue - a progressive framework for building user interfaces based on components
- Angular - Google's popular framework for building web applications