One of my colleagues has been playing devil’s advocate and hitting me with variations of the following question for a week or two now.
His question, “Chris, jQuery is so quick and easy to get going, why would I possibly use something like React or Vue that has such a steep setup curve? And it has so many plugins! And why wouldn’t I just keep using jQuery anyway? There’s nothing wrong with it!”
So there’s a couple of questions in that, so I’ll try here to break it down. I’ll start with the latter.
Why shouldn’t I keep using jQuery?
If you really don’t believe that you don’t need it, check out the great list at You Might Not Need jQuery, and while you’re at it, reconsider underscore/lodash with You Don’t Need Lodash/Underscore and the accompanying eslint plugin.
jQuery is so quick, how can React or Vue compete, and why bother?
And with tools such as CodeSandbox you can hack out a quick prototype quicker than you can say
But really, it’s what comes next that is the reason to leave jQuery for React or Vue. How often have you only made a single button click hide a div?
Does this look familiar?
Image by Manu Cornet
The reason to use one of these new component based libraries is that it makes you design your app in a different way (or actually design it at all). You think in components, you have a defined structure and data model, with predictable and maintainable structure.
But what about all the plugins? Won’t someone please think of the plugins?!
Yes, jQuery has been around so long it’s basically got the “there’s
an app a plugin for that” covered.
But both Vue and React communities are growing so fast, and their component based systems are tailor made for plug and play functionality.
Still not enough? You could always build a wrapper component for your fave library. Check out this post over on Medium to find out How to Use jQuery Libraries in the React Ecosystem
So this is the end?