Live data from Hacker News

React is the new jQuery

bradfrost.com

11–20 of 206 posts

Re: React is the new jQuery

#11
> Burn all of your markup down to the ground and replace what you had with

This isn't totally true -- if you really only wanted to implement a single toggle and leave the rest of the page alone, then you could replace just the relevant DOM elements with a container and render into that fragment of the page. (Though really I'd ask why use React if that's the only value you're getting out of it)

> I guess that’s why I’m still struggling to comprehend why so many organizations are so eager to take the sturdy, foundational layer of the frontend stack and rewrite it all in a proprietary format. [...] Projects like Vue are showing that’s not necessary.

Except, Vue.js does require a proprietary format; all those v-* attributes and custom components will be need to be migrated if you want to switch away from Vue. Comparatively, React is better in this regard because there are multiple implementations of React (preact, inferno, nerv). Also, JSX is technically optional, and it's really easy to mix markdown, or other formats/templating engines into a React app to handle the content-heavy bits.

Re: React is the new jQuery

#12

Let’s not forget that jQuery was a polyfill that allowed JavaScript Devs on all browsers to code to a common baseline. React is a nice —- and popular —- library for building UIs but it’s existence isn’t an indictment of the laziness of standards implementors for browsers (okay, IE mainly) and god-send to developers like jQuery was.

Yes, React isn’t _exactly_ jQuery, but it gives the same level of productivity boost comparing to development with just the modern DOM APIs (querySelector, classList, etc).

For a large project, React gives you way, way, way more benefits than jQuery does.

Re: React is the new jQuery

#13
> React is the new jQuery

Anyone who uses "the new jQuery" as some sort of insult (as it seems Sara did in her tweet) probably hasn't been a developer for more than a few years or is just trying to sound smarter than they are by bashing an easy target.

The reason jQuery got so popular is that it made common tasks so much easier than anything else at the time. Anyone who was doing web development before jQuery knows what a godsend it was at the time. JQuery was a fantastic leap forward for development at the time it was released.

JQuery didn't become bad, the rest of the development world caught up and made it unnecessary.

Re: React is the new jQuery

#15

If you tear out something like jQuery, you’re going to have to figure out a way to get those accordions to expand and collapse again. If you tear out React, you get a blank page. React is a big commitment. This is probably the only real concern I see. jQuery is a library for DOM manipulation. It can co-exist with many other libraries. React is an entire framework. These days you need jquery less because browsers are…

What does "an entire framework" mean? Because you can just make React the little news and weather widget in the corner of your app / website, as the only React component. Same with Vue.

The people for whom ripping out React or Vue leads to a blank page are those who wanted an app from the ground-up.

If anything, React is losing because it doesn't include enough out of the box. If you wanted to build a news widget, fine. But if you wanted to build an app, you have to start putting pieces together from 3rd parties (or write your own custom pieces). That's not what a framework sounds like to me, that sounds like figure-out-your-own-framework, and I think that's why Vue is winning.

Create React App was a very late response, and I still don't think it's as good as Vue's up-and-going tooling experience.

Re: React is the new jQuery

#16
React has a lot of inertia behind it, although it doesn’t really make things easier.

The amount of js code to make even basic things work is high, and with so many different styles of writing react/js code, large codebases require significant effort to keep maintainable.

Which is to say, with this much effort put into structuring maintainable react js code, one could pretty much develop in any js ui framework (including jquery, backbone or none whatsoever) - since little of this effort is dependent on react, or made easier by it.

Re: React is the new jQuery

#17
Moved from Vue to React. A couple things drove this: Typescript support for Vue was kind of weak, and the interception of events and reactive elements ended up creating more bugs. I do love how Vue is easy to get up and going fast, but React seems more compatible with a growing team where you want stronger guarantees.

Re: React is the new jQuery

#19

If you tear out something like jQuery, you’re going to have to figure out a way to get those accordions to expand and collapse again. If you tear out React, you get a blank page. React is a big commitment. This is probably the only real concern I see. jQuery is a library for DOM manipulation. It can co-exist with many other libraries. React is an entire framework. These days you need jquery less because browsers are…

What does "an entire framework" mean? Because you can just make React the little news and weather widget in the corner of your app / website, as the only React component. Same with Vue. The people for whom ripping out React or Vue leads to a blank page are those who wanted an app from the ground-up. If anything, React is losing because it doesn't include enough out of the box. If you wanted to build a news widget, fi…

I guess what I meant was when you build a widget with react - the whole widget has to be react.

With jQuery, you're likely building it with html and using jQuery for user interactions or animations (I know - not always true - constructing the markup with $('') is also useful). So its easier to rip out jQuery and replace it with - say - document.querySelector - or whatnot.

I personally think React is overkill if you're pulling it in to do a small widget on a larger non-react page

Re: React is the new jQuery

#20

React has a lot of inertia behind it, although it doesn’t really make things easier. The amount of js code to make even basic things work is high, and with so many different styles of writing react/js code, large codebases require significant effort to keep maintainable. Which is to say, with this much effort put into structuring maintainable react js code, one could pretty much develop in any js ui framework (includ…

I disagree. Bridging the concerns split between between HTML, JS and CSS helps a ton and would be a lot of code to write if not for React (or similar frameworks).
Post reply on HN