# React on Rails

> Integration of React + Webpack + Rails including server-side rendering of React

Source: https://talira.ai/catalog/react-on-rails-xxfb5g89
Every listing: https://talira.ai/catalog.md

- Kind: Open core
- Types: Library, Framework
- Categories: [frameworks / rails / frontend integration](https://talira.ai/categories/frameworks/rails/frontend-integration), [frameworks / react](https://talira.ai/categories/frameworks/react), [languages / ruby / rails](https://talira.ai/categories/languages/ruby/rails)
- Platforms: linux, macos, windows
- Licence: MIT
- Pricing: Free tier, from $150/month
- Pricing notes: Open source edition free (MIT). React on Rails Pro is free in development, test, CI and staging, and in production for organizations with fewer than 10 people, under $1M revenue in the last twelve months and under $1M raised ever (charities, educational institutions and hospitals free at any size); otherwise ShakaStack Pro at $1,800 per year per organization (the monthly figure is that divided by 12).
- Free tier: yes
- Self-hostable: yes
- Backed by: [ShakaCode](https://talira.ai/orgs/shakacode.md)
- Sponsors: JetBrains, Scout, Control Plane, BrowserStack, Honeybadger, CodeRabbit

React on Rails puts [React](https://talira.ai/catalog/react-a48drvqv.md) components into Rails views with a `react_component` view helper, passing props from the controller, with server-side rendering, hot reloading and automatic bundle generation. It builds the JavaScript with [Shakapacker](https://talira.ai/catalog/shakapacker-hhhnjmth.md) ([webpack](https://talira.ai/catalog/webpack-9pcx44tb.md) or Rspack), so a team keeps one Rails app instead of splitting off a separate frontend and API. The open source gem renders on the server through ExecJS; React on Rails Pro, a paid edition from the same maintainers, adds a Node.js rendering server, streaming SSR, React Server Components, fragment and bundle caching, code splitting and TanStack Router SSR. ShakaCode maintains both.

## Links

- Website: https://reactonrails.com
- GitHub: https://github.com/shakacode/react_on_rails
- Docs: https://reactonrails.com/docs/
- Pricing: https://reactonrails.com/pricing/

## Problems it solves

- use React components inside my existing Rails views without rewriting the app as a SPA
- server-render React in Rails so the page shows content before JavaScript loads
- pass data from a Rails controller straight into a React component as props
- I don't want to maintain a separate Next.js frontend and a Rails API
- set up webpack for a Rails app with hot reloading for React
- add a complex interactive editor to a few pages of an otherwise server-rendered Rails app
- stream server-rendered React from Rails for faster first paint
- use React Server Components with a Rails backend
- react-rails is in maintenance mode and I need a supported way to mix React and Rails
- split my React bundle per page in a Rails app so each page loads only what it needs

## Features

- react_component view helper
- props from Rails controllers
- server-side rendering (ExecJS in OSS)
- hot reloading
- automatic bundle generation
- Shakapacker with webpack or Rspack
- generator and create-react-on-rails-app
- react_on_rails:doctor diagnostics
- Pro: Node renderer, streaming SSR, React Server Components, fragment and bundle caching, code splitting, TanStack Router SSR

## Ways to run it

### React on Rails

You run it, MIT. Price: free.

Not included:

- Node.js renderer
- streaming SSR
- React Server Components
- fragment and bundle caching
- code splitting / Loadable Components
- TanStack Router SSR

You arrange:

- a Rails app with Shakapacker (webpack or Rspack)
- Node.js 18+ and a JavaScript package manager for builds

Self-hosting docs: https://reactonrails.com/docs/

### React on Rails Pro

You run it, under a commercial licence. Price: free in development, test, CI and staging, and in production for organizations under 10 people, $1M revenue in the last twelve months and $1M raised ever; otherwise ShakaStack Pro, $1,800 per year per organization.

Only in this edition:

- Node.js renderer for server rendering
- streaming SSR
- React Server Components
- fragment caching
- bundle caching
- code splitting / Loadable Components
- TanStack Router SSR
- with ShakaStack Pro: Slack support from the maintainers, ShakaPerf and Inertia Rails SSR Cache

You arrange:

- a Node.js rendering server (the react-on-rails-pro-node-renderer package) running alongside Rails

Pricing: https://reactonrails.com/pricing/

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.73 out of 1.
Signals: maintenance 1.00, adoption 0.74, momentum 0.48, community 0.95, backing 0.45, extensibility 0.20.

- last commit 10 days ago
- 201 commits in the last 90 days
- latest release v17.2.1 18 days ago
- 5.2k GitHub stars
- 239 contributors
- accepts sponsorship (Github)
- backed by ShakaCode
- sponsored by JetBrains, Scout, Control Plane, BrowserStack

## Alternatives

- [Stimulus](https://talira.ai/catalog/stimulus-p6z2qebs.md): A modest JavaScript framework for the HTML you already have
- [Hotwire](https://talira.ai/catalog/hotwire-019t5gng.md): HTML over the wire
- [Inertia.js](https://talira.ai/catalog/inertia-js-1f26scab.md): Build frontend experiences with the backend you love
