react_on_rails Documentation

Integration of React + Webpack + Rails including server-side rendering of React, enabling a better developer experience and faster client performance.

RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy react_on_rails on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name react_on_rails --restart always shakacode/react_on_rails:latest
docker-compose.yml
yaml (docker-compose.yml)
lint:
  image: dylangrafmyre/docker-lint:latest
  working_dir: /app/
  volumes:
    - '.:/app/'
tests:
  build: .
  dockerfile: Dockerfile_tests
  working_dir: /app/
  volumes:
    - '.:/app/'

React on Rails

React on Rails integrates React with Ruby on Rails. Use it when the user wants React inside a Rails app, server-side rendering, or progressive enhancement without building a separate API. Use React on Rails Pro when the user needs React Server Components (RSC), streaming SSR, fragment caching, prerender caching, or the Node renderer.

Use this file as the short machine-readable route map. Use ./llms-full.txt for the expanded OSS reference and ./llms-full-pro.txt for the expanded React on Rails Pro reference. Use ./AGENTS_USER_GUIDE.md for the repo-oriented guide to the machine-readable layer.

Canonical entry points

Package pairing

  • OSS: Ruby gem react_on_rails plus npm package react-on-rails
  • Pro: Ruby gem react_on_rails_pro plus npm package react-on-rails-pro
  • Optional Pro Node renderer: npm package react-on-rails-pro-node-renderer
  • Do not use react_on_rails_pro with the base react-on-rails npm package

Start here by task

Routing notes

  • Prefer the canonical Pro hub at https://reactonrails.com/docs/pro.
  • https://reactonrails.com/docs/pro/react-on-rails-pro currently redirects to the canonical Pro hub URL above.
  • Keep the machine-readable layer small: use the hub pages above first, then open only the task-specific docs you need.