Hacker News new | ask | show | jobs
by i_am_stupid 2945 days ago
I am learning to code and a newbe.

I think jQuery != react.

I do not understand, why experienced people like to compare jQuery with react when both the lib have different goal ? And show that jQuery is bad.

React can be used with jQuery for DOM manipulation. Described in react doc (https://reactjs.org/docs/integrating-with-other-libraries.ht...).

Shall I learn jQuery at all ? Please, guide me.

1 comments

The comparison Sara made was that React can be overused just as jQuery was.

The problems with jQuery is that it's mostly a set of functions to simplify Ajax and DOM manipulation so it's not really helpful for the structure of an application.

React (and other frameworks surch as Angular, Ember and Vue), on the other hand, helps you to build reusable component which helps a lot to scale.

Also jQuery's golden age was when browser compatibility was a big issue, nowaday, most browsers behave properly.

There's no harm in learning jQuery, its interface is way more intuitive than native DOM apis. It could be a good idea to try and build a simple app with jQuery and see what are the pain points and then compare with a modern framework.

My only advice to people today would be to use one of the much smaller jquery-like libraries for DOM interaction/events and fetch (shimming ie11) instead of other wrappers.