Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Your code will be longer, and less readable. Unless it's a speed dependent thing I don't think it's worth it (my last two js things involved a lot of svg, canvas and animation and needed to be lightning fast so I went full vanillat there)
-
coolq48207yI think avoiding dependencies where possible is a good goal, but those dependencies exist for a reason... It's a balance between speed/readability.
-
@1989 could not have said that better myself. To op, just use whatever you want man. But I must say, it is a good experiment in getting good with basic JS
-
Crazed20367yI wish more people appreciated vanilla JS. It's such a strange creature, but people are too lazy to type a few extra words and just hit up jQuery like it's not just JS with shortcuts.
-
Crazed20367y@nbamaral learning vanilla JS is good just because there will be times jQuery isn't feasible or necessary, and you'd look pretty silly not being able to do basic tasks without a massive helper library
-
@Crazed
You're right, everyone should know the vanilla syntax, dom selectors, events and even object inheritance before even learning jquery (SO doesn't help, most answers are jquery anyway) - browsers are compliant enough now (that was the need for something like jquery was written for).
I already know more of javascript than I want to 😄, I'll use vanilla when appropriate, jquery when it's sufficient (hell more readable an year later).
Can't say I miss the times you started by checking for "layers" (netscape) or had to use too different ways to hide things 😄 -
Crazed20367y@nbamaral I learned jQuery first like a pleb and got frustrated when I realized I should have learned JS first lol. Def know more JS now than jQuery, but DOM selection and manipulation in jQuery is convenient.
-
mlask8487yToday, when there’s native querySelector in vanilla JS, there’s no need for jQuery. Just ask on StackOverflow how to do something in JS and... whoa, jQuery everywhere, people once again forgets the roots...
-
Crazed20367y@mlask but $('#thing') is shorter than document.querySelector('#thing') so obviously jQuery is a superior language
/s -
@mlask
But the roots were shaky 😄
I lived through the hell of netscape 4 vs ie 5 vs ie 5.5 vs opera days (yes I'm old).
So jquery was a godsend until it all got compliant and coherent.
In a sense js is catching up with jquery (not the fault of the language itself but mostly the different implementations by vendors). -
py2js27657yJust think from the perspective of the people who suck at frontend (me). Without jQuery I wouldn't even be able to do some small tasks that a backend engineer has to do
-
Yvan5137yI hate doing frond-end, having knowledge about JS sometimes also are pre or must haves at some companies. @arpit1997
-
py2js27657y@Yvan yeah yeah I know. I know backend side js aka node.js so I am quite on safe side but its the frontend side js that bugs me
Maybe it's time to stop jQuery being lazy and start using vanilla JS like a pro!
rant