lol. Montreal would like to have a word.
HN user
cptrp2101
I agree. No need to go into something that exists and do a big refactor to pull it out. I'm advocating for not adding it to things you start now.
You're bang on here. Why import an entire library when once polyfill and native features will serve you nicely.
I had a big post but deleted it all. I can more concisely say this:
The people here saying they still use it have so far demonstrated what I always say. If you're using jQuery, it's time to go back and relearn javascript. Most people should REALLY research the querySelector and querySelectorAll DOM methods.
I've always felt that jQuery encourages you to let your skills stagnate and you don't learn what your code is actually doing. Learn what the current spec has to offer. You don't need another dep just to target dom nodes ffs.
https://developer.mozilla.org/en-US/docs/Web/API/Document/qu...
Does the same as the $ query but native in every browser in IE9+ and gives you a native node. Also more performant than getElementBy<whatever> methods.
These are really cool. As someone who mostly writes code for web, this seems like a fun way to learn a new stack.
I switched from momment to dayjs in a project I finished a couple months ago and the massive reduction in entry size was remarkable. I really like dayjs.
I think, as with anything else, it's important we understand the tools we are using. I started with jQuery and the problem was (like many others) I learned it before I actually learned javascript. I've since backtracked and dug into vanilla JS so I can have a better understanding of what my code does.
Since then, I haven't found a situation where I miss jQuery. However, I don't damn anyone who uses it (beyond jokey arguments with the wordpress dev on my team).
It seems like this opinion won't fit in well here, but at this point I find vanilla more than enough for anything where Vue or React will be overkill. However, I'm obviously biased as a front-end app dev and am open to seeing what other people have to say.
I'm not sure what to think about the server side vs. client side comments in the article since that fall outside my area of knowledge.