docs/oss/migrating/angular-js-integration-migration.md
React on Rails offers a smooth transition to migrating your existing AngularJS + Rails application to use React with Webpack on top of Rails. Here are a few highlights and tips.
Ideally, you should have your JavaScript libraries packaged by webpack and gathered by yarn. If you have not already done this, then you can set up the ReactOnRails default JS code directory of /client to load the JS libraries related to AngularJS, etc. You can configure Webpack to globally export these libraries, so inclusion this way will be no different from using the Rails asset pipeline. However, so long as you understand how your JavaScript will eventually make its way onto your main layout, you will be OK.
Once you move to Webpack, you can start using CSS modules. However, you'll need to carefully consider if your styling needs to apply to legacy AngularJS components in your app.
Check out the ngReact package. This package allows your AngularJS components to contain React components, including support for passing props from AngularJS to React. The ShakaCode team is using this library on a commercial project. However, we're doing this with some limitations:
We love using Storybook to create a simple testing and inspection area of new React components as we migrate them over from AngularJS Components.
The big question when doing the migration from AngularJS to React is whether you should replace leaf level components first, to minimize the changes before you can deploy your hybrid AngularJS and React app. The alternative is to try to replace larger chunks at once. Both approaches have pros and cons.