←back to thread

324 points onnnon | 2 comments | | HN request time: 0s | source
Show context
breckenedge ◴[] No.42728538[source]
Glad they spent some times discussing the downsides. I’m 4 months in to a Hotwire Native replacement for an unmaintained React Native app. The differences are stark and I could definitely see myself picking up Hotwire again for another project if given the same constraints, but I’ve had good experiences with React Native in the past too. Ultimately though I just do not like all the work that has to go into maintaining a large scale React codebase.
replies(4): >>42728584 #>>42730514 #>>42731681 #>>42737998 #
mattgreenrocks ◴[] No.42728584[source]
Curious what you meant by the last sentence there. Does React uniquely complicate maintenance as a codebase grows?
replies(2): >>42728646 #>>42736403 #
breckenedge ◴[] No.42728646[source]
Theres a constant churn of a bunch of dependencies. Devs add minuscule libraries all the time. And I think some of the best React libraries have been abandoned, which is kinda sad, but nice from a maintenance perspective.

React very much feels like programming using only side-effects and that’s not really a fun experience IMHO. Performance issues are also somewhat difficult to spot in review and not very elegant to solve.

It’s been a few years since I’ve used React Native so maybe things are better now?

replies(4): >>42728699 #>>42729924 #>>42732824 #>>42735864 #
nozzlegear ◴[] No.42729924[source]
> React very much feels like programming using only side-effects and that’s not really a fun experience IMHO.

This is interesting and I like the way you've phrased it. Are you talking about React Native, or React in general? And do you use hooks?

I like React on the web, but only when using hooks and only because I haven't found anything that I like more than it. I still find it tedious and overly hook-y¹. It also gives a lot of wiggle room for devs to shoot themselves in the foot with useEffect, like some of my previous clients have done.

¹ Hold on, I gotta pull in 18 hooks from across my project, npm dependencies and react itself before I can write the jsx in what would otherwise be a 10-15 line fooButton function.

replies(2): >>42730581 #>>42731679 #
WorldMaker ◴[] No.42731679[source]
> I like React on the web, but only when using hooks and only because I haven't found anything that I like more than it.

After being thrown into the Angular woods for a while I found that what I really wanted was just a "React with RxJS Observables that look like writing Hooks if you squint, but don't have some of the complex rules either" and then I realized that I was basically trying to reinvent some of Knockout, but with TSX templates. I'm still amazed by how much I was able to accomplish from that idea, including some of the "advanced" features of modern React, in a relatively small package (modulo the one and only one dependency on RxJS).

I don't know how many other developers want the same thing.

(I know some find RxJS overly complex, which is exactly why Angular is as awful to work in as it is, both in how it badly uses RxJS (and teaches bad habits) and how there's generally three ways to do everything, one with RxJS and two others avoiding it or misusing it, with now a fourth way of Signals which are just RxJS-lite with Knockout-style `computed`, proving time is a flat circle and Angular remains a design-by-committee mishmash of too many things that don't interoperate well. I think learning Angular's mishmash is far worse than just learning RxJS well, but I also spent a lot of time doing Rx in C# and in CycleJS for a while, too.)

replies(1): >>42733783 #
1. CharlieDigital ◴[] No.42733783[source]

    >  and then I realized that I was basically trying to reinvent some of Knockout, but with TSX templates.
You may like Vue with TSX.

https://vuejs.org/guide/extras/render-function.html#jsx-tsx

React's reactivity model is "inverted" from almost every other model out there. Vue, to me, feels the most like Knockout. I also find that I rarely run into edge cases compared to React and Vue feels the most like OG HTML.

replies(1): >>42734432 #
2. WorldMaker ◴[] No.42734432[source]
I did investigate Vue with TSX at one point. It wasn't for me, but I did like Vue with TSX over Vue's primary template language.

A part of the way I see it is that Knockout promised "Observables" and `computed` was sort of the distracting fork away from something like RxJS Observables. Now that fork seems to be named "Signals". I'm not a fan of "Signals" and think they miss a lot of the power and elegance of "real" Observables like RxJS. I understand the appeal of the "magic" of `computed` tools. I better appreciate the power of the larger toolbox of RxJS operators. (I also think Observables are a lot easier to unit test than `computed`. A good "marble test" is a thing of beauty.)

For what it is worth, my RxJS-based solution: https://github.com/WorldMaker/butterfloat