Using jQuery with Vue.js (pros and cons)

in Code Write a comment

I want to share my thoughts on using jQuery and Vue.js together. In my experience, there’s no good reason why you should be using jQuery with Vue.js.

Vue.js is a self-contained JavaScript framework. There’s nothing you can’t do in Vue.js that you can do in jQuery.

Cons of using jQuery with Vue.js:

  • Extra kilobytes will be sent with each site load (over 80KB, minified).
  • Chaos in your DOM as Vue.js implements a virtual DOM, meanwhile, jQuery is used to manipulate the static DOM.
  • jQuery uses a totally different approach to track DOM elements. It looks for elements by id and classes.

Hi, I'm Renat 👋


Conclusion Vue.js or jQuery

If you’re building a single-page application using Vue.js, you shouldn’t be using jQuery unless your using plugins that require jQuery.

Vue.js is reactive, simple, intuitive and written in plain JavaScript. You can build a prototype with Vue.js, a single-page application, a progressive web app with loads of state changes.

jQuery is cross-platform, has loads of plugins and very popular. If you want to build a website with simple DOM manipulations – use jQuery.

Please share your comments below. 
Renat Galyamov

Want to share this with your friends?

PS: Make sure you check other Vue.js tutorials, e.g. Top 5 CSS frameworks for your Vue.js project (2019)set the background image using inline styles in Vue.js.

A collection of UI components for
Bootstrap 4/5 and Vue.js

Get now

Write a Comment