Skip to content
프로젝트

소개

React, Webpack, Rails를 통합하고 React 서버 사이드 렌더링을 지원해 개발 경험을 개선하고 클라이언트 성능을 높입니다.

웹 및 앱 개발

이 수치를 측정하는 방법

What you can do

  • Render React directly inside Rails views with react_component.
  • Use Rails-oriented SSR in OSS, or upgrade to Pro for Node-rendered SSR, streaming SSR, and React Server Components.
  • Keep a single Rails app instead of splitting into a separate frontend and API.
  • Use modern bundling with Shakapacker, including Rspack support.

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
0
in 1 month
-1

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

reactrails


LicenseGem Version npm version Gem Downloads

Integration Tests Gem Tests JS Tests Linting

Documentation · Quick Start · Examples · Pro · Free & Pro

React on Rails

React on Rails integrates React into Ruby on Rails applications with Rails view helpers, server-side rendering, hot reloading, and automatic bundle generation.

This README is intentionally brief. For setup guides, architecture, API reference, upgrades, examples, and Pro features, use the main documentation site: reactonrails.com/docs.

React on Rails is maintained by ShakaCode.

Start Here

  1. Documentation home
  2. Quick Start
  3. Create a new app
  4. Install into an existing Rails app
  5. Examples
  6. Compare OSS and Pro
  7. Free & Pro and sign up
  8. Compare with alternatives
  9. Changelog

These docs are for React on Rails 17. Historical docs and code are available for v15 (code), v14, v13, v12, and v11. See the upgrade guide before using v15 material.

Install in 30 Seconds

Create a new React on Rails app:

npx create-react-on-rails-app my-app
cd my-app
bin/rails db:prepare
bin/dev

New apps default to React on Rails Pro for React 19.2 support. Use --standard only when you intentionally want an open-source-only setup.

Add React on Rails to an existing Rails app:

bundle add react_on_rails --strict
bundle exec rails generate react_on_rails:install
bin/dev

Render a component in any Rails view:

<%= react_component("HelloWorld", props: { name: "World" }) %>

If you hit setup issues, run:

bundle exec rake react_on_rails:doctor

Why Teams Use React on Rails

  • Render React directly inside Rails views with react_component.
  • Use Rails-oriented SSR in OSS, or upgrade to Pro for Node-rendered SSR, streaming SSR, and React Server Components.
  • Keep a single Rails app instead of splitting into a separate frontend and API.
  • Use modern bundling with Shakapacker, including Rspack support.

React on Rails Pro

React on Rails Pro adds higher-throughput SSR and advanced rendering features on top of the open-source gem, including Node renderer support, streaming SSR, React Server Components, fragment caching, and TanStack Router SSR.

React on Rails Pro is free in development, test, CI, and staging when used solely to prepare an application before production. Production use that serves real users or supports a live application requires ShakaStack Pro unless the organization qualifies for a free use. Organizations qualify when they meet all three limits across their affiliates: fewer than 10 people, under $1M revenue in the last twelve months, and under $1M in outside capital raised ever. Charities, educational institutions, and hospitals are free at any size.

ShakaStack Pro includes React on Rails Pro, ShakaPerf, and Inertia Rails SSR Cache for every affiliate, application, environment, repository, and developer in your organization, with Slack support and no limit on headcount or revenue. It costs $1,800 per year per organization at pro.reactonrails.com. An active React on Rails Pro subscription already counts as ShakaStack Pro. ShakaPerf follows its own free use rules, including for CI. No license key is needed to run React on Rails Pro; a key only marks your pages Licensed. See The ShakaStack License.

Start with the docs here:

  1. React on Rails Pro docs
  2. OSS vs Pro feature comparison
  3. Upgrade to Pro
  4. Free & Pro and sign up

Requirements

  • Ruby on Rails >= 5.2
  • Shakapacker >= 6.0 (autobundling requires >= 7.0; CI tested: 8.2.0 - 10.3.2)
  • Ruby >= 3.3 (CI tested: 3.3 - 4.0)
  • Node.js >= 18
  • A JavaScript package manager such as pnpm, npm, yarn, or bun

Help

Contributing

Bug reports and pull requests are welcome. Start with CONTRIBUTING.md and the help wanted issues.

Security

Suspected security vulnerabilities should be reported privately. See SECURITY.md for the disclosure process and supported version policy. Please do not open a public issue for security reports.

License

React on Rails is available as open source under the terms of the MIT License.

React on Rails Pro is offered under The ShakaStack License, version 1.0, applied to React on Rails Pro. React on Rails Pro development, test, CI, and staging use is free when used solely to prepare an application before production. Production use requires ShakaStack Pro unless a free use applies. One $1,800 yearly subscription covers your whole organization across React on Rails Pro, ShakaPerf, and Inertia Rails SSR Cache. No license key is needed to run React on Rails Pro. Questions: [email protected].

Supporters

Thanks to the companies supporting ShakaCode's open-source work.

JetBrains Scout Control Plane BrowserStack Honeybadger CodeRabbit

관련 프로젝트 살펴보기

불러오는 중…