Live data from Hacker News

React is the new jQuery

bradfrost.com

81–90 of 206 posts

Re: React is the new jQuery

#81

> 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 w…

I agree jQuery was very useful early on, especially since it abstracted cross-browser differences and APIs.

However in my experience, a couple of things were key to creating a negative view of jQuery:

1. Security and unsafe defaults, for example: evaluating remote JavaScript by default [1]; and unsafe DOM parsing by default [2]

2. Not really to blame on jQuery, but its ease of use for DOM manipulation led to programming patterns that aren't easily scalable, for both code and performance

[1] https://nvd.nist.gov/vuln/detail/CVE-2015-9251 [2] http://api.jquery.com/jQuery.parseHTML/

Re: React is the new jQuery

#82

I think there is some confusion comparing jquery with frameworks in general heh- time for a history lesson! So back in the mid-aughts right before jquery there was prototype. I got hired into a job where I had to maintain sites written with both in the past and they were very similar to each other. Ajax was new and so was the class based handling of JS to make it more object oriented. It could be done but prototype m…

There were also mootools and dojo. I was more into those two but jQuery made everything dead simple.

and dont forget scriptaculous :)

Re: React is the new jQuery

#83
I really like the linked Vue/Jquery article in the story as well. I've built some stuff in Vue and I really like it. It can be incredibly simple.

I'm not a huge fan of React. I'm really not a fan of any site that requires Javascript to view. If it's a new article and I get a blank page, I immediately stick it in archive.is. I'm not turning on Javascript for your site just to view content. Fuck that. Fix your site to not suck shit.

I realize you can easily get into the same thing with Vue .. and I think Vue, React and others, makes sense if you're actually running a web application. Your main page, login page and other content pages should be static, no Javascript required. If you have a new site or a blog or graphics, why the hell are you requiring React/Vue/Angular or some other framework? Just display the content.

I haven't really looked into server-side rendering, but I suspect that still requires Javascript to be enabled on the client? Are there any newer Vue/React style front-end frameworks that are designed to still degrade gracefully without Javascript? (I suppose you can't really do this without pairing it with the backend language on the server).

I really like how Hackernews still supports a Javascript-less system, even for things like up/down votes (although I still turn JS on for HN to avoid page refreshes).

Re: React is the new jQuery

#84
post #68

I find myself defending myself a lot these days here. I use vanilla js. Never had any trouble, I literally have no bundle, no dependencies, the amount of code I have to write is basically the same either way, no trouble syncing state with DOM either. Have done so in two moderate projects (40k, 15k). Everyone I meet looks at me like I'm crazy. But in the same breadth say the site feels so smooth and responsive. No shi…

I agree you can do that but I feel like frameworks are more about teamwork. I can't imagine having a team of 10 with varying levels of JS experience/passion and telling them all to "just write nice simple vanilla JS that we can all agree is clean and simple" and expect that to happen.

Re: React is the new jQuery

#86
When I see this:

    var formname = $(this).find('.formname');
    formname.empty();
    formname.append(n_input);
I think why not just use plain Javascript and do this:

    document.querySelector('.formname').innerHTML=n_input;
Coders that are attached to libraries and frameworks always seem so afraid to use the tech already available. That they don't even look at how the basic solution would look like.

Re: React is the new jQuery

#87

Earlier quoted context omitted.

You also get convention. jQuery didn't offer much of that once you started gluing its functions together... I can usually jump into someone's react code and get what's going on pretty quickly unless they did something really gnarly with incredibly nested props. Even then, at least I still know where to drill down. With jQuery soup, you didn't get that luxury. Being able to have an entire team know how to build compon…

jQuery had a lot of convention, for both it and it's plugins. jQuery + co. have very consistent "look and feel"

[deleted]

Re: React is the new jQuery

#88

Earlier quoted context omitted.

There were also mootools and dojo. I was more into those two but jQuery made everything dead simple.

and dont forget scriptaculous :)

I'm having flashbacks to 2006! mootools, dojo, prototype, scriptaculous, jquery.

Re: React is the new jQuery

#89

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).

I feel this is because many people confuse Redux (or flux) with React itself.

Or the more general problem of not knowing the difference between store state, local component state, and component instance state (the actual JS object's properties.)

The new Unstated library leveraging the next Context API is a nice balance I find for state management. It basically just mirrors Reacts setState style update system. Although you do lose the single source of truth pro of Redux.

Re: React is the new jQuery

#90
post #66

Earlier quoted context omitted.

Well kids these days. They said webkit is the new IE, and said the IE era was IE7. Sigh I cant even name a similar piece of software in web development history that is as important as jQuery. Despite Web development as a whole, back end or front end is still no where near being good enough, it is still many times better then the old days.

>cant even name a similar piece of software in web development history that is as important as jQuery. Php?

Netscape navigator?
Post reply on HN