Live data from Hacker News

Does anybody like React?

jsx.lol

251–260 of 353 posts

Re: Does anybody like React?

#251

More than React, I'm interested in the question of how to best write UI through code, in general. Even though I'm a fan of React, and use it for practically every web application I build, my biggest and most obvious issue has been that writing UIs through React doesn't feel as natural as, say, writing command line tools in Go, or live/realtime apps in Elixir. Some languages just feel incredibly natural and frictionle…

> Some languages just feel incredibly natural and frictionless for certain things, and nobody has really nailed UIs yet.

Emphatically yes. If you look at books written about the problem in the early 90s[1], they are still applicable today.

> The current solutions, although I find it hard to describe precisely, are always tantalizingly lacking in one way or another.

The best analysis of this I have seen so far is in Chatty's Programs = Data + Algorithms + Architecture: consequences for interactive software engineering [2]. It's a bit hard to get through, but absolutely worth it.

As a short summary, the problem is architectural, or more specifically linguistic/architectural mismatch: the architecture our "general purpose" programming languages induces, which is the call/return architectural style, does not match the architecture required for user interfaces, but rather conflicts with that style.

I also wrote about it in Can Programmers Escape the Gentle Tyranny of call/return?.

My current approach is to first build a programming language that can easily express alternative architectural styles: Objective-Smalltalk [4].

With that I am now working an a UI framework I call interscript, including HTMXNative and other goodies.

It seems to be working out...

[1] For example, Languages for developing user interfaces by Myers et al https://api.taylorfrancis.com/content/books/mono/download?id...

[2] https://opendl.ifip-tc6.org/db/conf/ehci/ehci2007/Chatty07.p...

[3] https://2020.programming-conference.org/details/salon-2020-p...

[4] https://objective.st

Re: Does anybody like React?

#252

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.

The company I work for uses Vue. I think the non-backwards-compatible move from Vue 2 to Vue 3 burned a lot of the current devs, so now they're stuck working on Vue 2 apps that are in maintenance mode with no viable case to clean up the mess by moving everything to Vue 3. The experiments to do it with Copilot mostly failed, although that was in the early days so another try today might work better. If we're doing som…

I am in a process of upgrading fairly big Vue 2 app (technically 2 apps, where one is not traditional and the other uses Inertia) to Vue 3.

It is a fairly painful process - I am using Codex and Claude as a first pass for converting things, but everything has to be checked manually and often fixed or rolled back to try again. Too often instead of "removing" piece of code that is not necessary anymore, AI would try to add a 100 line workaround for it because it would really rather add things than remove them.

It is, however still a faster process than doing manual rewrite. Smaller components are a breeze to convert from older Vue 2 to Vue 3 composition API.

Rewriting entry point app.ts with bunch of custom plugins was a horrendous experience that eventually was done manually. Move from Vuex to Pinia was also 50/50. Some things were easy, some things were not and had to be done manually.

Then there's a process of switching from unsupported packages which is a whole other can of worms.

Overall - if not for AI I'm not sure I'd have gone with an upgrade at this point. Yes it requires careful review and testing, but a ton of trivial stuff was done very quickly.

Re: Does anybody like React?

#253
I used to love react of old with redux/flux and little to no hooks and weird side effects. It had super sound software design at the cost of being bulky.

I think we should return back to that with the era of LLMs. We don't write the code anyway. Let's use reducers and fully event sourced states.

Re: Does anybody like React?

#254
post #37

Earlier quoted context omitted.

What about Angular 2+?

Angular 2+ is equally horrible. Having spent 6 years on various versions of Angular, their migration story time and again has been an incredible pain. These days I use web components for component writing and frameworks to handle routing, state management, bundling, and so on.

can you compare it to other frameworks?

I migrated from Angular 4 to 18 (including ngrx and material) and didn't find it especially problematic.

Migrating mostly was little effort and consisted of automatic migration and walking through the provided checklist (mostly to ensure I didn't miss anything important), but I don't have any comparison in the JS SPA ecosystem.

Re: Does anybody like React?

#255

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.

The company I work for uses Vue. I think the non-backwards-compatible move from Vue 2 to Vue 3 burned a lot of the current devs, so now they're stuck working on Vue 2 apps that are in maintenance mode with no viable case to clean up the mess by moving everything to Vue 3. The experiments to do it with Copilot mostly failed, although that was in the early days so another try today might work better. If we're doing som…

I led a project to (successfully) migrate a Vue 2 to 3 app and while that was painful and expensive, I still find Vue more pleasant to work with than React once it was done. But TBH depending one team code discipline either could be fine or a nightmare. :)

Re: Does anybody like React?

#256
No particularly strong feelings either way. It suffers from the same issue as all the other JS frontend - it evolved along with browsers over years and was constrained by whatever browsers happened to support rather than from a cohesive design

Re: Does anybody like React?

#257
I prefer HTML over JSX, and AlpineJS is good enough. Sometimes it's nice to have a few web components.

I've helped juniors learn React as part of their studies and when they then come to intern with me they become happier once they learn other ways of making things happen on the screen.

Re: Does anybody like React?

#258
I only migrated projects from React to something more sensible. I am not sure why people like it. Maybe it is good for bigger teams. Astro with OpenProps is what is super simple, fast to develop and maps naturally to the business functionality I work on most of the time.

I have no idea why people go for these super heavy frameworks. Maybe there are some aspects I am not considering that justifies React.

Re: Does anybody like React?

#259
post #163

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

We are very far away from Angular 1.0 days, and not every single website needs JavaScript.

Exactly right. And this is why Astro works very well for me.

Re: Does anybody like React?

#260
post #205

Earlier quoted context omitted.

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

Any conversation which isn't dead will age fast in tech. What is the state of discussion on generating a random integer? Even that conversation advances.
Post reply on HN