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 on rails v2 #198

Merged
merged 4 commits into from
Jan 14, 2016
Merged

React on rails v2 #198

merged 4 commits into from
Jan 14, 2016

Conversation

justin808
Copy link
Member

This commit contains the basic steps needed to migrate from 1.x to 2.0
of react_on_rails.

Please see corresponding pull request for more details, as well as the
docs for react_on_rails.

  1. Update the react_on_rails gem
  2. Search you app for 'generator_function' and remove lines in layouts and rb files that contain it. Determination of a generator function is handled automatically.
  3. Find your files where you registered client and server globals, and use the new ReactOnRails.register syntax. Optionally rename the files clientRegistration.jsx and serverRegistration.jsx rather than Globals.
  4. Update your index.jade to use the new API ReactOnRails.render("MyApp", !{props}, 'app');
  5. Update your webpack files per the example commit. Remove globally exposing React and ReactDom, as well as their inclusion in the entry section. These are automatically included now.

This commit contains the basic steps needed to migrate from 1.x to 2.0
of react_on_rails.

Please see corresponding pull request for more details, as well as the
docs for react_on_rails.
And remove React and ReactDom from Webpack entry points.
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 this pull request may close these issues.

None yet

1 participant