Why we shouldn't use jQuery anymore ?
Belhassen Chelbi Dec 15 '17
Sometimes You don't need it !
So what I did is that included a 93.5 ko file so I can write 5 lines of easy code.So performance matters right? I tried to write it in vanilla and I wrote 20 line of code (It can be more optimized) and the file was less than 1 ko, so I saved 92-93 ko which does matter.
So I took more time and it was a bit tricky because it was vanilla so it was building the jquery methods and it improves me as a developer.
Vanilla isn't that bad
avoiding Spaghetti code
Throw some code and it will work, but are you going to be a better developer if you do that ? of course not. Imperative programming with jquery is really the worst thing I've ever experienced even if I made things work. It's hard to read some spaghetti code after one month of writing it.
So are you someone who cares about performance(and even if jQuery isn't that heavy) and who wants to develop his knowledge in programming in js, stop using jQuery.
I'm learning React , what I feel
Of course, I won't compare jQuery and React but when working with React I loved how we can divide the application building components and every component has a precise function to do... It was a revolution in my Js knowledge. I'll talk about my "coup de foudre" with React in a later post maybe, but what I wanted to say is that jQuery is a really spaghetti encouraging library that you need to avoid because it's harmful.
and Eminem said about a developer who uses jQuery :"There's vomit on his sweater already, mom's spaghetti"
You don't need Eminem to say that about you right?