Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialhector daniel almeida cañez
48 PointsHello, this can also be accomplished using Jquery, so, how does react differ from it?
These scoreboards functions can also be accomplished using Jquery, ive been changing interfaces appending elements or just changing data after ajax calls, so, how different is react from jquery?
1 Answer
Thiam Hock Ng
22,131 PointsI once asked the same question as you. Why use React when I can accomplish the same with jQuery. You can also further extend this question to why use jQuery when you can accomplish the same using pure JavaScript.
While there are some technical differences, for e.g. virtual dom manipulation that React is using. But I think the biggest advantage of React is that it provides a consistent way of managing the interactivity of your frontend.
I developed a non-trivial project before using jQuery and Rails as the backend. I do not foresee a lot of interactivity initially. But as requirements change, I started to add more interactivity using jQuery and AJAX. Then it get more. And more. As a result, I have a lot of jQuery code sprinkle around my frontend code base. It is really messy. And when you have teammates, it will be worse. Maintaining a highly interactive site with jQuery and ajax is going to be a nightmare.
Using React, you will know how the state is being managed. This makes your app easier to debug and maintain. Of course, this means that you will have a steeper learning curve.
hector daniel almeida cañez
48 Pointshector daniel almeida cañez
48 PointsThank you! i got your point i really appreciate it