reactjs

reactjs/react-rails

JavaScript Apache-2.0 Web Dev Single maintainer risk

Integrate React.js with Rails views and controllers, the asset pipeline, or webpacker.

6.8k stars
740 forks
recent
GitHub +1 / week

6.8k

Stars

740

Forks

33

Open issues

30

Contributors

v2.6.2 06 Apr 2022

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...

Web Dev Library Discovery value: 3/10
Documentation 7/10
Activity 8/10
Community 8/10
Code quality 5/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 6/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

rails-integration react-ssr jsx-transpilation asset-pipeline legacy-modernization
Actively maintained Well documented Popular Niche/specialized use case Apache-2.0 licensed Production ready
Deep Analysis · Based on README and public signals
3w ago

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.

Origin

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.

Growth

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.

In production

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.

Code analysis
Architecture

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.

Tests

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.

Maintenance

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.

Honest verdict

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

Risks
  • 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.
Prediction

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.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

JavaScript
77%
Ruby
21.6%
HTML
1%
TypeScript
0.2%
CoffeeScript
0.1%
CSS
0.1%
Shell
0%

Information

Language
JavaScript
License
Apache-2.0
Last updated
1w ago
Created
158mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

shakacode

shakacode/react_on_rails

React on Rails integrates React with Ruby on Rails for server-side rendering,...

5.2k Ruby Web Dev
shakacode

shakacode/react-webpack-rails-tutorial

A full-stack tutorial and live demo application showcasing React, Redux,...

1.7k JavaScript Web Dev
rails

rails/tailwindcss-rails

This gem integrates Tailwind CSS v4 into Rails applications, providing a...

1.6k Ruby Web Dev
stimulusreflex

stimulusreflex/stimulus_reflex

StimulusReflex is a Ruby on Rails library for building reactive, real-time web...

2.3k Ruby Web Dev
inertiajs

inertiajs/inertia-rails

Inertia Rails is a Rails adapter for Inertia.js that enables building...

1.2k Ruby Web Dev
vs. alternatives
shakacode/react_on_rails

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.

inertiajs/inertia-rails

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.

rails/rails

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.