# reactjs/react-rails

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

Repository: https://github.com/reactjs/react-rails
Canonical: https://ross.abutalabs.com/products/react-rails
Language: JavaScript
License: Apache-2.0
License Family: permissive
Topics: react-rails, jsx, react, rails, ruby, sprockets, webpacker
Last push: 2026-07-31T21:53:06+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 8, longevity 100
- inputs: {"age_days": 4787, "days_push": 33, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6776, forks 739 (observed 2026-08-28T04:09:48.499154+00:00)

## What it is
A Ruby gem that integrates React.js into Ruby on Rails applications, supporting server-side and client-side rendering with views, controllers, and asset pipelines like Sprockets, Propshaft, and Shakapacker. It allows writing React components in JSX, ES6, TypeScript, or CoffeeScript within Rails projects.

## Use cases
- render React components inside Rails views
- server-side render React in a Rails app
- use JSX with the Rails asset pipeline
- mount React components via Sprockets or Shakapacker
- add React to an existing Rails monolith
- wire React components to Rails controllers and props

## When to choose
- you have an existing Rails app and want to add React components incrementally
- you use Sprockets, Propshaft, or Shakapacker and want React integration
- you need simple server-side rendering of React within Rails views

## When to avoid
- you are starting a new project and want active development and modern React features like Server Components - prefer React on Rails
- you need a dedicated Node-based rendering pipeline with TypeScript support
- your frontend is a separate SPA not embedded in Rails views

## Facets
- artifact type: library
- maturity: maintenance
- function: ssr, templating, frontend-framework, middleware
- domain: web-development, frontend, developer-tools
- platform: ruby
- tags: react, rails, ruby-gem, server-side-rendering, jsx, webpacker, sprockets, shakapacker, nodejs, web-server

## Member repositories
- reactjs/react-rails (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:48.499154+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:42:23.638325+00:00, confidence not recorded.
  - readme: https://github.com/reactjs/react-rails (fetched 2026-08-28T04:09:48.499154+00:00, sha e0382e89d7a9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
