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.
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.
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.
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.
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.