Skip to content
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

Closed
jtmalinowski opened this issue Jul 24, 2013 · 7 comments
Closed

react-rails #231

jtmalinowski opened this issue Jul 24, 2013 · 7 comments

Comments

@jtmalinowski
Copy link
Contributor

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.

@petehunt
Copy link
Contributor

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!

@zpao
Copy link
Member

zpao commented Jul 24, 2013

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!

@jtmalinowski
Copy link
Contributor Author

Alright! I started watching your repo @zpao !

@zpao
Copy link
Member

zpao commented Jul 24, 2013

Doing a little bit of cleanup, but it works!

screen shot 2013-07-24 at 3 22 13 pm

@zpao zpao mentioned this issue Jul 24, 2013
@jtmalinowski
Copy link
Contributor Author

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.
So if anything will still be on todo, count me in.

@zpao
Copy link
Member

zpao commented Jul 27, 2013

@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.

@zpao
Copy link
Member

zpao commented Jul 31, 2013

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 🎆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants