Live data from Hacker News

Does anybody like React?

jsx.lol

201–210 of 353 posts

Re: Does anybody like React?

#201
After spending so long writing React code, I'm now working on a large Vue project at work. Everyone used to say Vue was the easier of the two, the more approachable option — but I'm starting to see it differently. React, in its elegance, gives you components that are essentially just functions — and beyond that, there's not much more to it (setting aside the whole Next.js ecosystem). It's the most elegant thing I've encountered in frontend development. Vue, on the other hand, feels like a jumble. You can tell it was clearly adopted and glorified by backend developers who didn't want to properly learn JavaScript — and what emerged is this awkward mashup that never quite coheres into something clean.

Re: Does anybody like React?

#202
This is my favourite quote (and I write this as someone with no experience with HTML frameworks):

    > How to build a counter component using the HTML Framework in just 1 line of code
    > Locate your /node_modules folder and drag it to the trash bin.

    > Scott Jehl
    > 5th October 2024

Re: Does anybody like React?

#203
post #38

As someone who lived through all major waves of JS for the last ~16 years, I do love react, in a sense: React is the worst JS framework except for all the others we've tried. I'd take React over the Angular 1 days any time. I'd take Angular 1's full-bodied MVC over the "build it yourself from scratch every time" approach of Backbone. I'd take Backbone's minimal MVC structure over the classic JQuery Soup architecture.…

Wait, react is a framework now? People used to say that react is just a model binding library. FYI I haven't used react.

Yep, react is indeed a library. Part of the confusion comes from a fact that react community was keen to hijack "react" name and slap it onto their own projects, for example there were react router, react query, react table, etc., so one could have get a feeling that react was like full-fledged framework, while most of these "react" projects were not affiliated with react the library in any way.

Re: Does anybody like React?

#204

Earlier quoted context omitted.

What does being intuitive have to do with software optimization? You can write poorly performing code for anything. Most people never touch profilers.

The same kind of bugs don’t happen in Vue because the framework handles them for you.

Maybe fair maybe not, but definitely unrelated to how intuitive it is.

Re: Does anybody like React?

#205

Earlier quoted context omitted.

But why over vue? My biggest frustration has been how vue ends up moving in the direction of react. The original component architecture with the html template, JavaScript state and css styles in vue was so nice. Even the data fetching a url in the component was so intuitive.

A bit out of date, but I like the point-of-view of "The single most important factor that differentiates front-end frameworks" : https://mjswensen.com/blog/the-single-most-important-factor-...

> A bit out of date

> article just about to turn three years old

JavaScript community never beating the allegations lol

Re: Does anybody like React?

#206
It was an improvement in some regards, but a pita most of the time. Before I had to work on an Angular project React was my least favorite frontend library. Solid.js gave me back my sanity (also Svelte 5). Fast, small, includes what I need and feels like just writing JS/TS. Sadly businesses love to torture their developers, themselves and users too much, so React/Angular it is.

Re: Does anybody like React?

#207

Earlier quoted context omitted.

They are actually speaking to trying to make an in-app back button use the history stack so that it _doesn’t_ “break” your browser’s back button. The problem with just calling history.back() with no fallback is it will bounce users out of your app (back to Google or wherever they came from) and PMs won’t like that…

`history.back()` shouldn't even exist, it's almost never correct to use it instead of a logical back button that works on the logical navigation structure e.g. going up a level, or to the previous page, etc. For example, if you are on Page 5, then pressing "back" inside the app should always take you to Page 4. `history.back()` could take you to any page, it's unpredictable.

Disagreed. In everyday speech "going back" means going to where you came from. If I'm at a friend's place at 123 Main Street and I tell him I'm going back, what I'm saying is I'm heading back to my home, not to 122 Main Street. The web should work similarly.

And the idea of logical navigation is flawed because most websites don't have a well defined logical structure, nor is it feasible to have one. What is the previous page of a Wikipedia article, or an HN submission, or an Amazon listing, or a search result of cheapest direct flights between New York and Cancun? With how the back button currently works, at least there is consistency in what to expect when clicking it. Under your suggestion, there is no way a user knows what the back button does on each website unless he clicks on it first and find out himself.

Re: Does anybody like React?

#209
post #30

Earlier quoted context omitted.

I was a big Sevelte fan. After writing a sizeable application in Sevelte I realized that React is superior in every way overall speaking and at least you're writing 100% pure JavaScript directly. Or Typescript. Plus the ecosystem. It's huge. Nothing comes closer.

> 100% pure JavaScript directly How did the React community convince so many people of this falsehood? Do that many people just not know what javascript is? It baffles me that one could look at JSX and be like, “that right there is vanilla javascript”.

vanila javascript would not be far off, just replace the tags with function calls. In early versions of react, there were people who wrote code like that. For some reason web devs since collectively agreed that the xml syntax is essential to web technologies

Re: Does anybody like React?

#210
post #99
post #81

Of course people do. No one is forced to use React or any other web framework unlike how they are practically forced to use JavaScript, and yet React wins. This should be enough evidence that people like it enough, at least more than most other frameworks out there. It is also somewhat ironic that until late 2010s a common complaint about web development is how fast it changes and how many new things are coming up al…

I have never been able to pick the framework and libraries for my day job. I’m almost always working on something someone started years prior or bound to an organization that has strict choices. Personally I wouldn’t pick react :) React wins because it has become a default choice and folks like what’s comfortable to their preferences

I mean, that means someone at your work liked React enough to choose it over the alternatives.

I see a lot of personal projects, solo founder applications etc running made in React. I respect your opinion but other people definitely do choose it when they have fully control of what they use.

Post reply on HN