-
Notifications
You must be signed in to change notification settings - Fork 755
Using Redux with react-rails #486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There's no reason you can't use Redux with this gem! You can use this gem to transform JSX and insert React components into Rails views. Your React components can interact with Redux any way they want! |
@rmosolgo Thank you so much for your answer. This was rather a non-fruitful question. If you don't mind answering a few more, I am curious about the following:
|
Yes, to the same degree that off-the-shelf Rails couples frontend to backend. I think this is a feature: There's only one project -- no overhead for switching projects (same repository, same development team, same build tools, same deployment strategy). Because they are "coupled", you can fetch exactly the data you need when you need it. It makes it very easy to add new features and fix things, which is what people really want
I think the biggest advantage is that you don't have to use Node.js 😆. I'm happy to stay heavy on Rails and light on Node.js. There are a few nice things that I'd like (named imports, sourcemaps), but I don't think they're worth all the overhead they bring with them! |
👍 👍 Thanks!! |
@rmosolgo I actually tried to setup |
Hmm, what I do with dependencies is:
Then the library's object is available as a global (eg, Does that flow work with Redux? |
@woniesong92 You might consider https://github.com/shakacode/react_on_rails/. We have built-in support for Redux, including a Rails generator. See http://www.reactrails.com/ for a live example. |
Is it not possible to use Redux with this gem?
I am aware of
react_on_rails
but I don't want to migrate to another gem which can lead to unnecessary complexities.The text was updated successfully, but these errors were encountered: