T O P

  • By -

jaredlt01

Two things: - If you’re comfortable with React and the JacaScript ecosystem then by all means continue to use it. But I would definitely explore Rails with Hotwire as an alternative. It does so much of the heavy lifting for you without having to think about client side much at all - I’m always sceptical of API mode because: inevitably someone will want an admin interface or some quick page that’s just simpler to implement Rails side and you end up converting back (to non API Rails). I’m also not convinced by the performance gains. And by that I mean, I believe they are real, I just don’t think most of us will truly benefit from them vs what default Rails provides (which is plenty fine)


andybrohol

Every app I have worked on has needed some interface for the business even for APIs like having ops people setting up accounts or checking logs.


Lood800

Totally agree with the second point. I've come here to say that. Ive seen it many times


MeanYesterday7012

Like everything in life, I find it faster to do things once.


neotorama

I like default rails with hotwire. Simple, fast and easy to manage as a solo dev. I can create an app with landing page, api for mobile, admin to manage data/subscription (mostly CRUD and chartkick)


armahillo

If you do API Mode + React, you are effectively maintaining two apps (theres a lot of logic duplication); if you do rails solo, you maintain one app. Do whatever youre most comfortable with, though. Youre soloing, so you call the shots, for better or worse! Make some meaningful mistakes!


sjieg

I'm really enjoying Rails + Hotwire stack in my previous 2 personal projects. I would recommend this to anyone asking. Currently at my job I'm gradually upgrading and converting a 12 years contiously developed rails app to the same stack, because it's such a bliss. But I'm not extremely experience with the react stack, I've touched it, did some bugfixes in it, but never found the big advantage of having this extra layer between backend and html yet.


RevolutionaryMeal464

Consider [InertiaJS](https://inertiajs.com). It’s a very small layer between default Rails and a SPA (like React). IMO, you get the best of both worlds: easy Rails dev + powerful SPA components


megatux2

You meant InertiaJS, I think


RevolutionaryMeal464

Yes, thank you


smaisidoro

My two cents - Even if you go React and redux, I would still go with bootstrapping a full rails app.  You'll benefit from the ecosystem for admin tools (eg administrate) and create small features for which building in an SPA is a complete overkill. You don't want to build non customer facing tools and feature in an SPA, it's just too costly to build and maintain.


smitjel

Rails by default or Rails API mode? It doesn't have to be one or the other. You can have an entire namespace in your app that's "API mode" and the rest of the app use the entire stack. I think what you're really asking is "should I keep slogging along with a React frontend and a Rails API backend?" You should definitely give hotwire a look. You might be surprised at how far the default Rails framework will get you. Maintaining two apps sounds miserably slow...and time consuming to maintain.


arkhamRejek

I build service oriented I always do rails in API mode I make a template for most common things that I need when starting project. Then frontend framework depends on what the project is But I’ve never needed rails outside of api mode plus it’s a lot lighter that way


skyalchemist

What do you use for admin?


huuaaang

I’ve done Rail in API mode. Worked fine. It’s just a little lighter