Hacker News new | ask | show | jobs
by hfourm 598 days ago
What about Rails and Svelte? While many people are doing things with full stack Rails, there are just as many using Rails (whether as a monolith or separate backend from frontend deployments) with modern JS.

Actually, in recent Rails versions the mistakes of Webpacker have been replaced with much more flexible gems for building frontend assets with esbuild, vite, or any other build tool.

This gives the ability to seamlessly blend the nice pre packaged rails ecosystem with the nice ecosystem of react components or other modern frontend tooling most people are using.

I close this comment with mentioning: you still may not need all of that new stuff! What does your app actually do?

1 comments

Tbh, if you're already using rails the odds that you'll need svelte / react are pretty low. Sometimes you might, and those pages can pull those in, but generally speaking you can do a lot with Turbo and Stimulus.
There’s actually a couple really good ways to embed React in a Rails template. Let’s you have something really interactive when you need it.
I mean, it just totally depends on the application. It does add complexity, sure.

Turbo, stimulus, have their own pitfalls. I have worked with them a fair amount and have ran into headaches. Also, React has a massive community / ecosystem of ready made components, plugins, tutorials, etc. Turbo and stimulus are getting better on that front, but it is nowhere close, and many situations/patterns you have to figure out yourself.

Theres weird hate on React from a portion of the rails community that seems unwarranted. Probably because of some of DHH's commentary.