What makes jquery take up a lot of memory?

I’ve been told by many people that using jquery takes up a lot of memory when in usage. Why does this happen and what makes it?
Would taking the essential parts out of the code and making a new library link of my own cut down the memory level?

Use it if fits the purpose better.
Some time you have to support code that has been built on top of jQuery.
It is a very useful library to manipulate the DOM.

I have see a few times people using jQuery inside React !

jQuery just includes a lot of stuff, including tons of deprecated features. You can cut it down with some hand-hacking on the source to remove stuff you don’t need, but it sounds like a lot of time and work for a library that is obsolete for almost every practical purpose. For new projects, I recommend either using a modern framework like React (a fifth the size of jQuery) or vanilla JS with lodash (importing only the bits you need).

1 Like

I use that one, but users like @brandon_wallace and @Steffan153 told me to use react, angular, and vue… instead.

@ConnerOw1115 you can even use regular Javascript or CSS. It depends on what you want to do. If what you need to do is simple no need to add a library or framework to your project. Just because a person knows React does not mean that they have to use it.

So DOM would be another option? I’ve been trying to learn it so I can remake the jquery stuff and not use the entire library.

How about making your own Jquery in a modular way? People can only use the modules they need and keep the overhead down. People could import the modules they need like this:

    <script src="js/conner-fade.js"></script>
    <script src="js/conner-animate.js"></script>
    <script src="js/conner-events.js"></script>

Yeah. that’d be great, but how do I make one of those little libraries?

Open up the non-minified version of Jquery and study it, see how they built it.

yeah. i know that part, but how do I create the fade/slide/animating library links? like the jquery has a link. It is actually a URL that I can go to, but the example ones you have don’t exist yet.