Re:You might not need jQuery (2014)
by catmanjan on Thursday January 14, 2021 @02:28AM
(#25773281)
I've done this before - you just end up rewriting jQuery hehe.
[ Parent
| on HN ]
Re:You might not need jQuery (2014)
by DarkWiiPlayer on Thursday January 14, 2021 @03:45AM
(#25773800)
You'd end up writing a subset of jQuery that only has the parts you need and skips those where you almost wouldn't gain anything.
Well, except that jQuery and a number of third parties have already extracted or ported various subsets of jQuery and have packaged it already for easy integration.
Re:You might not need jQuery (2014)
by galaxyLogic on Thursday January 14, 2021 @01:50PM
(#25780467)
That's a good solution if you need such a subset. But maybe you need just a single function.
And maybe such a single function is currently already provided by the browser APIs.
Or maybe there are packages of individual functions of JQuery? But that would serve little purpose IF the functionality is provided by current browsers.
In any case I think the article serves a good purpose in explaining what are the most useful parts of JQuery and how you could implement them yourself with the more modern browsers if and when you need them.
My preference is to avoid dependencies if I can and prefer depending on my own code which uses standard APIs if possible.
Over time you end up adding just about everything back in as the app grows... But worse!
Re:You might not need jQuery (2014)
by galaxyLogic on Thursday January 14, 2021 @01:57PM
(#25780562)
Probably not for any given single app. Some apps need more JQuery-like functionality some less