Integrate React.js with Rails views and controllers, the asset pipeline, or webpacker.
6.8k
Stars
740
Forks
33
Open issues
30
Contributors
AI Analysis
React-Rails is a bridge library that integrates React.js with Ruby on Rails, enabling server-side and client-side rendering of React components within Rails views and supporting multiple asset pipeline options (Sprockets, Shakapacker, Propshaft). It is best suited for Rails developers building React-based UIs who want tight Rails integration rather than a decoupled frontend architecture; it is not for teams using modern Node-based build tools or those seeking the latest React patterns like Se...
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
React-Rails bridges React components into traditional Rails apps, but now openly steers users toward its successor
React-Rails enables Rails developers to embed React components in server-rendered views via ERB helpers, server-side rendering, and the Rails asset pipeline or Shakapacker. It targets Rails teams that want incremental React adoption without a full SPA architecture. Originally under the reactjs GitHub org, it is now maintained by ShakaCode, who also built the more feature-complete react_on_rails gem. The README explicitly recommends migration away from this gem toward react_on_rails, marking a notable shift in posture from active development to sustained maintenance.
Created in July 2013, one of the earliest official bridges between React and Rails. Grew alongside both ecosystems, supporting Sprockets, Webpacker, and eventually Shakapacker. Transitioned from reactjs org maintenance to ShakaCode stewardship over time.
Peak growth occurred 2014–2018 as React adoption surged and Rails teams sought pragmatic integration paths. Stars plateaued as the ecosystem matured and alternatives like react_on_rails and Inertia.js emerged. Zero net stars in the past 7 days suggests the project has reached a steady, legacy-user base rather than attracting new adopters.
6,771 GitHub stars and 743 forks accumulated since 2013 suggest substantial historical adoption. The gem is published on RubyGems and the companion npm package on npm, both with version badges, indicating active distribution. Blinkist is cited as a client testimonial for related ShakaCode work. Direct evidence of current large-scale production deployments is not documented in the README, but the gem's longevity and fork count make some ongoing production usage highly probable.
Appears to follow a two-layer design: a Ruby gem providing Rails view helpers (react_component) and server-side rendering support, paired with a react_ujs JavaScript package handling client-side mounting and unmounting via DOM data attributes. Likely relies on ExecJS or a similar JS runtime for SSR. Supports Sprockets and Shakapacker bundling paths.
CI badges for Ruby tests are present in the README, indicating automated test workflows exist on GitHub Actions. Specific coverage percentages or test methodology are not documented in the README.
Last push was June 19, 2026 — three days before evaluation date — confirming the project is actively maintained. However, the README itself frames the project as a migration candidate rather than a development target, suggesting maintenance is focused on stability and compatibility rather than new features.
ADOPT IF: you are maintaining an existing Rails app already using react-rails and need continued Sprockets/Shakapacker compatibility without migration cost. AVOID IF: you are starting a new project or need React Server Components, TypeScript-grade tooling, or active feature development — use react_on_rails instead. MONITOR IF: you are weighing migration timing and want to track when react-rails drops support for a Rails or Shakapacker version that forces your hand.
Independent dimensions
Mainstream potential
2/10
Technical importance
5/10
Adoption evidence
6/10
- The README openly recommends migrating away from this gem, signaling that ShakaCode considers react_on_rails the strategic path — future investment may be minimal.
- React ecosystem moves fast; react_ujs is described in the README as less capable than the react_on_rails Node package, which may widen over time as React Server Components and concurrent features become standard.
- Dependency on ExecJS-style SSR (likely) creates a fragile runtime boundary that has historically caused production issues for Rails SSR users.
- Zero new stars in the past week and a plateaued growth curve suggest the project is unlikely to attract new contributors, which concentrates maintenance risk on ShakaCode.
- Rails 7/8 default stack (Hotwire, Turbo, import maps) reduces the addressable market for React-in-Rails tooling generally, not just this gem.
React-rails will remain in stable maintenance mode, receiving compatibility patches for new Rails and Shakapacker versions but no significant new features. Gradual attrition toward react_on_rails is likely over 2–3 years.
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- JavaScript
- License
- Apache-2.0
- Last updated
- 1w ago
- Created
- 158mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
No open issues — clean slate.
Open pull requests
chore(deps): bump fast-uri from 3.1.0 to 3.1.2 in /react-builds
chore(deps): bump @babel/plugin-transform-modules-systemjs from 7.20.11 to 7.29.4 in /test/dummy
chore(deps): bump postcss from 8.5.8 to 8.5.14 in /test/dummy
Top contributors
Recent releases
Similar repos
shakacode/react_on_rails
React on Rails integrates React with Ruby on Rails for server-side rendering,...
shakacode/react-webpack-rails-tutorial
A full-stack tutorial and live demo application showcasing React, Redux,...
stimulusreflex/stimulus_reflex
StimulusReflex is a Ruby on Rails library for building reactive, real-time web...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
6.8k | +1 | JavaScript | 6/10 | 1w ago |
|
|
5.2k | — | Ruby | 8/10 | 7h ago |
|
|
1.7k | — | JavaScript | 7/10 | 2d ago |
|
|
1.6k | — | Ruby | 8/10 | 2d ago |
|
|
2.3k | — | Ruby | 8/10 | 1d ago |
|
|
1.2k | — | Ruby | 8/10 | 1d ago |
More feature-complete alternative with TypeScript internals, better React Server Components support, and more active core development. The react-rails README explicitly recommends migrating to it. Slightly fewer stars (5,191) but positioned as the successor.
Takes a fundamentally different approach: no SSR by default, no React-specific coupling — instead uses a protocol layer to connect any Rails controller to any frontend SPA framework. Better fit for teams wanting full SPA behavior without JSX in ERB.
Not a direct competitor, but Rails 7+ introduced import maps and Hotwire/Turbo as the default JS story, reducing the pressure to adopt React at all for many teams. This shifts react-rails from a mainstream choice to a deliberate opt-in.