3 ms·
Is there a Rails for React? I use React+Redux+Typescript and it's nice but I always have trouble setting up a new project. Rails is magic in that it's all read
by renewiltord 6y ago
Is there a Rails for React? I use React+Redux+Typescript and it's nice but I always have trouble setting up a new project.
Rails is magic in that it's all ready. React+Redux+Typescript is great. I just don't want to make decisions here. I want to just make a web app. Like how Rails defaults to ActiveRecord and friends, is there something like that for Rails+React+Redux+Typescript?
I'm looking for:
* Few decisions for me to make
* It's relatively popular enough that there is a community around the whole thing
It's a huge productivity enhancer with Rails to be able to google "Rails do x" and someone has an answer to that. If I had to google "Ruby with X library and Y other library" I think I might commit suicide because the Rust experience is like that: "Use actix-web". Ah, and how do I use that with this other tokio based library. Oh you can't, because you need to make sure the runtimes are compatible.
I don't want all that.
- crooked-v 6y agoTake a look at Next.js, which incorporates a general-purpose router, does all the Webpack stuff for you, has generally painless server side rendering support (but you can also build a purely client-side bundle), and has direct support for a long list of popular libraries. It doesn't handle global state, but has tested examples for Redux[1] and various other libs that incorporate the server-side rendering and static site generation functionality that Next.js has. [1]: https://github.com/vercel/next.js/tree/master/examples/with-redux https://github.com/vercel/next.js/tree/master/examples/with-...
- renewiltord 6y agoThanks for the tip! Also appreciate you had your BTC link up in your keybase :)
- midrus 6y agoYep, next is great. It leaves you only with the following decisions to take: How to do css, css-in-js etc How to build the api, rest graphql or what How to access your database How to do background jobs How to send emails How to organize the project structure How to do validations How to do translations How to do migrations Other than this, it is great.
- midrus 6y agoThen just use rails. Why are you looking for the same thing in a different language? Just for the language? Or because it is more fashionable than using ruby?
- renewiltord 6y agoI find that writing React apps is easier for me than writing HAML apps. I have a system now where I can get both but I was wondering if that system is encoded as a framework. I tried the next.js suggestion from the other guy and it’s far short of rails so I think I’ll stick to my thing for now.