Starting with Vue.js with jQuery experience

Asked

Viewed 408 times

4

I have experience with Javascript and jQuery and after a few years I decided to leave my comfort zone and meet new horizons. I took a quick walk through the Angular until arriving at Vue.js..

Is there a question I’d like to clear up with friends, after all, Vue replaces jQuery? Or they have nothing to do with each other?

What Vue does that jQuery doesn’t and vice versa?

1 answer

5


The Vue.js and jQuery can be complementary or exclusive depending on what you want to do.

But in general the answer is if you use Vue.js then you don’t need jQuery.

The concept behind modern libraries like Vue.js or React.js is to have internal mechanisms to redesign the page and content. This type of "work" was typically done by libraries such as Mootools or jQuery. So without the need for such tools what happens is old libraries fall into disuse.

If you have some functionality Vue.js does not do (for example AJAX request, or a jQuery specific plugin) then you can use jQuery. If not, then you don’t need jQuery anymore.

Note that if you use jQuery you probably need to insert it by compiler such as webpack or Browserify. I found one for the webpack and another to the Browserify, but that’s a question apart.

  • "for example AJAX request" I do not understand, Vue does not consume by Ajax?

  • I’m sorry, I forgot to thank your reply which was very enlightening.

  • @Nixongirard yesterday I didn’t have time to come back here, and today I saw yours new question and answered there. As I mentioned there vue has ajax but not in the main file, you have to add another script. Sometimes, by necessity or by liking more.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.