Hacker News new | ask | show | jobs
by pgm8705 2583 days ago
I would say that Rails has fully embraced SPAs as an option. With Webpacker you can have React or Vue installed by default. That being said, at one point we decided to start using React to handle the front end of our Rails app and it has become a huge regret.

Recently we decided to switch back to using Rails + Turbolinks + Stimulus.js and the development speed and experience have been so much better.

It's disheartening to hear so few young people are using Rails. In my 10+ years experience, I always get drawn in by the new hot thing but always end up finding my way back to Rails for the better.

2 comments

I hadn't done rails in a while when I brushed up on it, and found Turbolinks to be a game changing addition.

SPA's just require way too much work and fine-grained detail for starter applications. I would not recommend to do full-stack node over rails if you care about iteration speed early on.

I did Rails + Mithril.js (5kb react-like SPA) and then switched to Rails + Turbolinks + a mix of vanilla js, stimulus.js, and abusing ajax & js.erb.

The biggest things I miss from the original setup:

1) it's easy to write integration tests when rails is nothing but an api

2) components. it's just way easier & nicer to work with than rails views/partials.

I thought rails + turbolinks + stimulus etc would be simpler in terms of code/maintainability, but I'm not so sure anymore.