Should you use jQuery or React?

tl; dr yes, it depends!

First of all, you may not need jQuery at all and only use the Web platform API, but this is another matter.

Let us focus on this issue. Should you use jQuery or React?

My answer is this. If you want to build a single-page application, React is the obvious choice. React is built for this, it will be responsible for generating views and rendering elements in the page, and you don't even have to think about the DOM (that is, the details of how to render content on the page).

React follows a declarative approach, using it you can work at a higher level.

When building a SPA, you should not really use jQuery (or native browser API) because things can get complicated quickly.

Although it can coexist in React applications, it is best for adding interactive parts to pages that are most likely to be server-rendered.

Using jQuery, you can directly interact with the DOM to select elements, and use selectors to find the content you want to manipulate on the page.

As the scale of the application expands, its level is much lower and it is more prone to complexity.

Download mine for freeResponse Handbook


More response tutorials: