Teams evaluating React on Rails are usually not starting from a blank Rails app.
They already have one of these:
react-railsvite_rails- a custom Rails-side React helper
Some teams also arrive from Inertia-first apps. We treat those as a separate architecture case study because they are usually broader page-shell migrations, not narrow React mount migrations. If that is your starting point, begin with Compare with alternatives.
This page tracks practical migration references for those cases.
The best examples are:
- Real Rails applications, not toy demos
- Small PRs that convert one page, mount point, or component boundary
- Honest about blockers such as old lockfiles, native gems, or custom frontend bridges
- Measured with before-and-after performance or maintainability notes instead of marketing claims
These maintainer-owned references are the stable starting set. Add community examples here after they have landed or stabilized enough to inspect.
- react-rails example app:
react-rails-to-react-on-railssnapshot — covers an olderreact-railsv3 →react_on_railsv13.4 migration, so treat it as a structural reference and follow current migration guides for gem and configuration specifics - react-on-rails-example-migration —
demonstrates a Rails 7-era
react-rails→react_on_railsmigration with Shakapacker client/server bundles and SSR setup, based on ganchdev/react-rails-example
In-progress third-party migration PRs are tracked in the example-migrations meta issue instead of this docs page.
That keeps the public docs focused on durable references while the meta issue can carry working notes about draft PRs, maintainer coordination, blockers, and proof artifacts that may change quickly.
When a public migration becomes a stable reference, add it to the published example list above with a short proof note.
This is usually the cleanest migration path: primarily a gem swap and mount registration change while the app architecture stays intact during slice-by-slice conversion.
This is more of an asset and entrypoint migration than a component rewrite: the route behavior should stay stable while registration moves into the React on Rails and Shakapacker flow.
This is common in mature apps that built a thin wrapper around React mounts.
Treat the wrapper as the migration boundary: preserve the Rails-side props contract, replace one helper-backed component first, and remove the wrapper later.
No dedicated guide exists yet. If your app uses this pattern and you want to contribute an example, see Contribute an example. The react-rails migration guide covers the nearest-neighbor mechanics for helper syntax and component registration.
Not every good migration example is performance-first.
When the change is performance-first, compare the same route on the baseline branch and the migration branch. At minimum, record:
- Response timing
- HTML size
- Route JavaScript bytes
- Number of JS assets needed for the route
- Hydration warnings or client boot errors
If possible, also record browser load metrics such as FCP, LCP, CLS, and TBT, plus interaction metrics such as INP. TBT is captured by Lighthouse; INP requires field data or a real-user monitoring tool.
When the change is maintainability-first, record:
- The custom bridge, oversized mount, or repo-specific contract that existed before the migration
- The standardized React on Rails helper or smaller boundary that replaced it
- What got easier to review, test, or evolve afterward
- The validation that supports the claim
Use maintainability notes when that is the honest win. Do not force a weak benchmark onto an example whose real value is simpler ownership or a narrower integration boundary.
If your migration could help other teams evaluate React on Rails, open an issue or submit a PR adding it to this page, and include:
- The integration you started from, such as
react-rails,vite_rails, or a custom helper - The first slice you picked and why it was small enough to review
- The proof you captured, whether that was performance, maintainability, or both
- The validation you ran locally or in CI
The most useful next examples are:
react-railsapps that migrate one Rails-owned mount at a time- Modern
vite_railsapps where one Rails-owned island can move before a broader asset rewrite - Apps with a custom Rails-side React bridge where one helper-backed boundary can be replaced before removing the wrapper
- Upgrades from older
react_on_railsversions to current maintained defaults
Use this page together with the specific migration guide that matches your current stack:
Other migration paths live in the Migration Guides sidebar:
- Migrate from Webpack to Rspack
- Migrate from Babel to SWC
- Migrate a Rails 5 API-only app
- Migrate from AngularJS
React Server Components migration content lives under React on Rails Pro in the sidebar:
The migration guides explain the mechanics. This page shows what those mechanics look like in real repos.