DEV Community

Discussion on: The Splintering Effects of Redux

Collapse
 
leastbad profile image
leastbad

Interesting summary. I genuinely wish that I could understand and appreciate why React is so compelling for you. We're of a likely similar age and experience; I taught myself React to help a friend compelled to use it at work and kept waiting for a lightbulb to go on that would suddenly make the all of the sacrifices and bikeshedding and complexity make sense. It never came. The amount of effort required to build just a front-end is so much more than building an entire solution in a SSR framework, and these days we have tools like Stimulus for providing structure and lifecycle.

Ultimately, I found StimulusReflex and never looked back. It lets me work in my framework of choice, Rails, and allows me to build Reactive interfaces that are faster than anything client-rendered that has to phone home to do everything. The reduction in complexity vs. what SPA folks have to deal with in terms of ecosystem and tooling + still needing a backend is bordering on unfair. I'd be genuinely eager to have you try a small project in Reflex and give me your hot take.

Here's a Todos implementation that's smaller and faster than the equivalent React app.

Collapse
 
bytebodger profile image
Adam Nathaniel Davis

dev.to/bytebodger/react-is-eating-...

Why I find React compelling (and why it can be so frustrating) is summarized in my latest post.

IMHO, SSR is much faster/easier to build. But I also believe that the end product is inferior. Full roundtrips to the server are definitely not where I want to be investing my dev skills in a modern context. Obviously, there's still a firm place for SSR, but not in the kinda apps I wanna build.

I did take a look at the Todos implementation. One thing that strikes me is that I can write that same app in React for nearly the same LoC. This isn't meant to argue for React or against Stimulus. But this is what led me to write a full blog post as a kind of "answer". Because React - in the form we often see in enterprise apps, is much more bloated and harder/longer to write. But it doesn't have to be at all (and that's frustrating to me). There's no reason why that Todo app can't be just as small-and-efficient as the Stimulus version. But usually, once the React community sinks their teeth into it, it will be indeed be much larger and much more obtuse.

Collapse
 
leastbad profile image
leastbad

That's (almost) all fair; I do think that it distorts the conversation when you suggest that SSR == full roundtrips == inferior UX. Turbolinks and StimulusReflex completely eliminate the full roundtrip argument, which I believe demands you reconsider your own internal algebra on the pros/cons.

Anyhow, thanks for replying and checking out SR.