Skip to content

Commit

Permalink
Merge pull request #219 from jbhatab/master
Browse files Browse the repository at this point in the history
add migration guide to go from react-rails to react_on_rails in readme
  • Loading branch information
justin808 committed Jan 23, 2016
2 parents 407cd20 + 4b84a9c commit 84e05e1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Please see [Getting Started](#getting-started) for how to set up your Rails proj
+ [Running the Linters](#running-the-linters)
+ [Developing with the Webpack Dev Server](#developing-with-the-webpack-dev-server)
+ [Adding Additional Routes for the Dev Server](#adding-additional-routes-for-the-dev-server)
+ [Migrate From react-rails](#migrate-from-react-rails)
+ [Additional Reading](#additional-reading)
+ [Contributing](#contributing)
+ [License](#license)
Expand Down Expand Up @@ -350,6 +351,24 @@ Note that **React-related error messages are typically significantly more helpfu
### Adding Additional Routes for the Dev Server
As you add more routes to your front-end application, you will need to make the corresponding API for the dev server in `client/server.js`. See our example `server.js` from our [tutorial](https://github.com/shakacode/react-webpack-rails-tutorial/blob/master/client/server.js).

## Migrate From react-rails
If you are using [react-rails](https://github.com/reactjs/react-rails) in your project, it is pretty simple to migrate to [react_on_rails](https://github.com/shakacode/react_on_rails).

- Remove the 'react-rails' gem from your Gemfile.

- Remove the generated generated lines for react-rails in your application.js file.

```
//= require react
//= require react_ujs
//= require components
```

- Follow our getting started guide: https://github.com/shakacode/react_on_rails#getting-started.

Note: If you have components from react-rails you want to use, then you will need to port them into react_on_rails which uses webpack instead of the asset pipeline.


## Additional Reading
+ [Generated Client Code](docs/additional_reading/generated_client_code.md)
+ [Heroku Deployment](docs/additional_reading/heroku_deployment.md)
Expand Down

0 comments on commit 84e05e1

Please sign in to comment.