-
Notifications
You must be signed in to change notification settings - Fork 47.5k
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
react-rails #231
Comments
This is freaking fantastic! Will this be rails-specific or work in any sprockets environment? Also, once this is working I would love to port over some of Insta's internal Django integration stuff to react-rails (including transparent server rendering), if it makes sense! |
Hey @JakubMal, I'm actually working on this right now. Going to have a branch in my repo very shortly. Sorry if this is duplicating work, but let's converge on a single solution! I'll post here once mine is up and you can tell me it sucks and we should just use yours - I actually haven't written a proper gem (react-source doesn't count) so I'm probably doing a lot wrong! |
Alright! I started watching your repo @zpao ! |
Awesome! Really looking forward, soon I'll be ready to use it in my own apps 👍 , as I said, I would be happy to start helping this weekend. |
@JakubMal I pushed out React (and more important react-source) v0.4.1 yesterday with you changes to JSXTransformer, so now the gem dependency can work without having to build and install react-source locally. I also just synced my branch with what's going to end up in the separate repo (https://github.com/zpao/react/tree/contrib-react-rails/contrib/react-rails). If you wanted to do any work, feel free to start doing PRs against that! I have a list of todos in the readme. The biggest thing will be tests, though if you think some other part of this is higher pri, feel free to hack on whatever. Anything will help! I'll make sure we maintain authorship into the new repo if we get changes in before the standalone repo opens up. |
As I mentioned in #233, we now have https://github.com/facebook/react-rails, so this is a wontfix here. Thanks again for forcing the issue @JakubMal 🎆 |
Guys, I'm starting my holidays next week, and also I need this in one of my projects.
I was discussing this with @zpao in one of issue discussions here.
Basically the idea is to take ember-rails code and use it to expose react.js and jsxtransformer.js in assets/.
Second thing would be to register sprockets engine to transform JSX, we could steal a bit of code from https://github.com/leshill/handlebars_assets and using execjs run jsxtransformer. I already tested all this and it works ok. Good thing we have a patch merged to allow jsx transformation using non-node, non-browser JS environment: #217
If no one is in a hurry about this, I would start making this gem, restructure the repo a bit (move all gem files into gems/ dir) and make all that's necessary to have a proper react-rails gem. I should be ready with an initial version of this some time next week.
PR will follow.
The text was updated successfully, but these errors were encountered: