Is React more complicated than JQuery for most people?

I’ve being trying to learn React for the past month and am finding it a lot more difficult compared to jQuery. With jQuery I seemed to progress and understand concepts quite quickly, whereas with React anything more complex than absolute beginner stuff becomes much too difficult to grasp. I’m around half-way through the complete React web developer Udemy course (highly recommended by all developers who were new to React, in order to understand the framework better), but as soon as the teacher moved beyond the basic stage of state and props, all of React’s concepts, syntax, logic, and everything else began to appear way more complicated than I suspect they should be. This is probably one of the reasons why I’ve been stuck on the Markdown Previewer for over a month, and all the other React projects aren’t faring any better.

I wanted to know if this is the general consensus on FCC that React is indeed complicated to understand and program in as compared to jQuery or if its more in the line of “it’s different for every person”?

It’s different, not necessarily harder. It is different enough that people initially didn’t like using it, but the developers seem to have gotten over that.

Full disclosure, due to the time I began learning web development, I learned React first and JQuery later out of necessity.

JQuery is a library, a little funky syntax, but you’re leveraging it’s functions ultimately. React despite calling itself a library is really more of a framework that has some inversion of control. What that means is instead of doing things your way and occasionally leverage React’s functionalities, you are doing things the react way. The advantage a framework gives you is that it gives you a set way of doing things and allow you to just focus on the business logic. It’s probably too complicated for doing something small, but when writing a big SPA, it helps everybody to follow the same set of rules.

Because I was indoctrinated with react first, I actually find it more intuitive. I write components, it renders a piece of DOM based on state and props. Renders “react” to data changes, data flow “down” the tree. Components have lifecycles and you can execute logic specific to certain stages of a component’s life…etc. It makes sense to me because probably i didn’t know any other way.

Obviously, without knowing the specifics of what you’re struggling with, it would be hard to compare experiences. I’ve always thought that the thinking in react post in the React doc was excellent in helping me understand React, I’d recommend you follow along and give that a try

1 Like

The first time I tried to learn React I struggled and the second time made much faster progress.

The biggest differences?

  1. The first time I thought I knew JS but didn’t really. I completed the FCC algorithms and data structures certificates along with a bunch of additional reading and experimenting with ES6. On returning to React I found a lot of my struggles were not actually understanding what the JS code was doing rather than anything React specific.
  2. Ignore redux. You’ll know when you need it (and it won’t be for a long time)
  3. Create a side project locally and deploy it somewhere. This will give you and understanding of how React code ends up in live sites
  4. Use Create React App. Don’t mess around with configuring task runners or compilers, this is a massive rabbit hole.

IMHO learning JQuery these days is a bit of a waste. It’s a pretty outdated library and not something that I would suggest ever adding to a new project. In most cases, it mainly exists in commercial projects because it is too difficult to remove.

Hope this helps.

1 Like

Yes, assuming a base knowledge of JS and the DOM it’s [much] more complicated [and/or complex].

JS was originally just for adding small touches of functionality to web pages, scripting little things - some form validation, being able to click on a button and have something happen somewhere else on the page, load in stuff from other places asynchronously (that’s AJAX). It’s just a nicer API than exists in the browser, very, very easy to understand, and under-the-hood, pretty basic. Browsers had all kinds of different ways of dealing with things, jQuery smoothed over that. It’s getting close to obselete as the browser APIs catch up.

You have an HTML page (or a website), and you want to do some interactive stuff you can’t do with HTML/CSS alone, that’s what jQuery (or equally just the basic JS DOM API) is ideal for.

If you want an entire JS-powered site (a single page app - ie there’s just a single HTML page and you attach an app to it), jQuery is not good for this. It’s possible to do, its just generally messy, and hard, and complex and complicated. In many cases, whether the huge, complex abstraction that is a front end framework is actually needed is arguable, but anyway.

React is much more difficult conceptually (and much more more difficult practically) than the basic usecases for jQuery. But when you need a complex single page app, using is React likely to be much easier (development-, performance- and maintainability-wise) than building the equivalent of React in jQuery (then building an app with the product of that).

1 Like