-
-
Notifications
You must be signed in to change notification settings - Fork 632
Split docs and migration content into focused update #2896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,7 +60,7 @@ Then use React in any Rails view: | |
| - **React Server Components**: Improved rendering flow and new `RSCRoute` component for seamless SSR | ||
| - **Performance improvements**: New async loading strategies and optimized bundle generation | ||
| - **Webpacker removal**: Streamlined for Shakapacker-only support (>= 6.0) | ||
| - **[Pro features](https://reactonrails.com/docs/pro/)** are available for advanced use cases including [React Server Components](https://react.dev/reference/rsc/server-components), [streaming SSR](https://react.dev/reference/react-dom/server/renderToPipeableStream), and a dedicated Node renderer for 10–100x faster SSR. | ||
| - **[Pro features](https://reactonrails.com/pro)** are available for advanced use cases including [React Server Components](https://react.dev/reference/rsc/server-components), [streaming SSR](https://react.dev/reference/react-dom/server/renderToPipeableStream), and a dedicated Node renderer for 10–100x faster SSR. | ||
| - ShakaCode now maintains the official successor to `rails/webpacker`, [`shakapacker`](https://github.com/shakacode/shakapacker). | ||
|
|
||
| --- | ||
|
|
@@ -150,7 +150,7 @@ That's it — Pro layers on top of your existing setup. See the [Pro installatio | |
|
|
||
| Popmenu achieved a [73% decrease in average response times and 20-25% lower Heroku costs](https://www.shakacode.com/recent-work/popmenu/) with React on Rails Pro, now serving tens of millions of SSR requests daily. | ||
|
|
||
| Ready to try Pro? Visit [React on Rails Pro docs](https://reactonrails.com/docs/pro/) or email [justin@shakacode.com](mailto:justin@shakacode.com). | ||
| Ready to try Pro? Visit [pro.reactonrails.com](https://pro.reactonrails.com) or email [justin@shakacode.com](mailto:justin@shakacode.com). | ||
|
|
||
| # 📚 Quick Start | ||
|
|
||
|
|
@@ -160,22 +160,6 @@ Ready to try Pro? Visit [React on Rails Pro docs](https://reactonrails.com/docs/ | |
| 📖 **[Complete Documentation](https://reactonrails.com/docs/)** - Comprehensive guides and API reference | ||
| 🎮 **[Live Demo](https://reactrails.com)** - See it in action with [source code](https://github.com/shakacode/react-webpack-rails-tutorial) | ||
|
|
||
| ## Choosing the Right Rails + Frontend Stack | ||
|
|
||
| These options solve different problems. If you want to keep Rails as your main app and use React where it adds the most value, React on Rails is the strongest integrated path. | ||
|
|
||
| | Stack | Best fit | React + Rails model | SSR / RSC story | Tradeoffs | | ||
| | ------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | ||
| | **React on Rails** | Existing or new Rails apps that want React integrated into Rails views with strong Rails conventions | React components render directly in Rails views via `react_component` | Built-in SSR in OSS; Pro adds Node-rendered SSR, streaming SSR, and React Server Components | More opinionated than wiring React into Rails by hand | | ||
| | **React on Rails Pro** | Teams that want the same Rails integration model plus higher-performance SSR and advanced rendering features | Same Rails app and view-helper model as OSS, with Pro-only APIs on top | Node-based SSR, streaming SSR, React Server Components, SSR caching, and TanStack Router SSR | Extra rendering features come with more moving parts than OSS-only setups | | ||
| | **Inertia Rails + React** | Teams that want SPA-style React pages with Rails controllers and no separate JSON API | Rails controllers return Inertia pages instead of traditional Rails views | Optional SSR; no first-class RSC path | Less natural for incremental React inside existing Rails views | | ||
| | **Vite Ruby + React** | Teams that want a lightweight bundler setup and are comfortable wiring the integration themselves | Rails + Vite asset helpers, with React mounted manually | DIY / experimental SSR path | Fewer Rails-specific React helpers and conventions out of the box | | ||
| | **react-rails** | Teams that want a simpler, older React-in-Rails integration | React components render in Rails views with a smaller surface area | Basic ExecJS SSR | Less active modern React investment and fewer advanced features | | ||
| | **Next.js + Rails API** | React-first teams that want Next.js conventions and are willing to split frontend/backend concerns | Next.js frontend talking to Rails as an API or backend service | Strong App Router / RSC / streaming story | Usually means giving up the one-Rails-app model | | ||
| | **Hotwire / Turbo** | Rails-first teams that want minimal custom JavaScript | HTML-over-the-wire with Stimulus/Turbo instead of React | Not a React SSR/RSC stack | Different programming model and not the React ecosystem | | ||
|
|
||
| **Recommended default:** Start with React on Rails if you want React inside a Rails app. Upgrade to React on Rails Pro when you want Node-based SSR, streaming SSR, React Server Components, or advanced SSR performance features. For more detail, see [Comparison with Alternatives](https://reactonrails.com/docs/getting-started/comparison-with-alternatives/) and the [OSS vs Pro feature matrix](https://reactonrails.com/docs/getting-started/oss-vs-pro/). | ||
|
|
||
| ## Project Objective | ||
|
|
||
| To provide a high-performance framework for integrating Ruby on Rails with React, especially regarding React Server-Side Rendering for better SEO and improved performance. | ||
|
|
@@ -198,7 +182,7 @@ To provide a high-performance framework for integrating Ruby on Rails with React | |
|
|
||
| > **Trusted by thousands** - See [real production sites](https://publicwww.com/websites/%22react-on-rails%22++-undeveloped.com+depth%3Aall/) using React on Rails | ||
|
|
||
| See [Comparison with Alternatives](https://reactonrails.com/docs/getting-started/comparison-with-alternatives/) for a deeper look at Inertia, Vite Ruby, react-rails, Next.js, and Hotwire. | ||
| See [Rails/Shakapacker React Integration Options](https://reactonrails.com/docs/building-features/rails-webpacker-react-integration-options) for comparisons to other gems. | ||
|
|
||
| ## Online demo | ||
|
|
||
|
|
@@ -216,8 +200,8 @@ _Requires creating a free account._ | |
|
|
||
| - Ruby on Rails >= 5 | ||
| - Shakapacker >= 6.0 (CI tested: 8.2.0 - 9.5.0; autobundling requires >= 7.0) | ||
| - Ruby >= 3.0 (package minimum; CI tested: 3.2 - 3.4) | ||
| - Node.js >= 18 (package minimum; CI tested: 20 - 22) | ||
| - Ruby >= 3.2 (CI tested: 3.2 - 3.4) | ||
| - Node.js >= 20 (CI tested: 20 - 22) | ||
|
Comment on lines
+203
to
+204
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep documented minimum versions aligned with runtime validator floors. Line 203 and Line 204 now document Ruby Suggested doc fix-- Ruby >= 3.2 (CI tested: 3.2 - 3.4)
-- Node.js >= 20 (CI tested: 20 - 22)
+- Ruby >= 3.0 (package minimum; CI tested: 3.2 - 3.4)
+- Node.js >= 18 (package minimum; CI tested: 20 - 22)Based on learnings: In 🤖 Prompt for AI Agents |
||
| - A JavaScript package manager (npm, yarn, pnpm, or bun) | ||
|
|
||
| # 🆘 Get Help & Support | ||
|
|
@@ -269,7 +253,7 @@ ShakaCode is **[hiring passionate software engineers](https://www.shakacode.com/ | |
|
|
||
| The gem is available as open source under the terms of the [MIT License](https://github.com/shakacode/react_on_rails/tree/main/LICENSE.md). | ||
|
|
||
| Note, some features are available only with a React on Rails Pro subscription. See [React on Rails Pro](https://reactonrails.com/docs/pro/) for more information. | ||
| Note, some features are available only with a React on Rails Pro subscription. See [React on Rails Pro](https://pro.reactonrails.com/) for more information. | ||
|
|
||
| # Supporters | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -23,8 +23,7 @@ React on Rails is one product with two tiers: open source for Rails + React inte | |||||
| ### Evaluating Rails + React options | ||||||
|
|
||||||
| - [Examples and migration references](https://reactonrails.com/examples) | ||||||
| - [Compare with alternatives (narrative overview)](./oss/getting-started/comparing-react-on-rails-to-alternatives.md) | ||||||
| - [Detailed feature matrix and benchmarks](./oss/getting-started/comparison-with-alternatives.md) | ||||||
| - [Compare with alternatives](./oss/getting-started/comparison-with-alternatives.md) | ||||||
| - [Migrate from react-rails](./oss/migrating/migrating-from-react-rails.md) | ||||||
|
|
||||||
| ## Dive deeper when you need it | ||||||
|
|
@@ -34,18 +33,14 @@ React on Rails is one product with two tiers: open source for Rails + React inte | |||||
| - [API Reference](./oss/api-reference/view-helpers-api.md) | ||||||
| - [Deployment and troubleshooting](./oss/deployment/README.md) | ||||||
| - [Configuration](./oss/configuration/README.md) | ||||||
| - [Changelog](https://github.com/shakacode/react_on_rails/blob/main/CHANGELOG.md) | ||||||
| - [Changelog](./oss/upgrading/changelog.md) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The link The previous link pointed to the real file on GitHub:
Suggested change
|
||||||
|
|
||||||
| ## Pro features | ||||||
|
|
||||||
| Start at [React on Rails Pro](./pro/home-pro.md) for the canonical Pro route map, then choose the feature family you need: | ||||||
|
|
||||||
| - [React Server Components](./pro/react-server-components/tutorial.md) - RSC tutorial and deep dive | ||||||
| - [Streaming SSR](./pro/streaming-ssr.md) - Progressive server rendering | ||||||
| - [Node Renderer](./pro/node-renderer.md) - Dedicated Node.js rendering server | ||||||
| - [Fragment Caching](./pro/fragment-caching.md) - Cache rendered components | ||||||
| - [React Server Components](./pro/react-server-components/tutorial.md) - RSC with Rails | ||||||
| - [Streaming SSR](./oss/building-features/streaming-server-rendering.md) - Progressive server rendering | ||||||
| - [Node Renderer](./oss/building-features/node-renderer/basics.md) - Dedicated Node.js rendering server | ||||||
| - [Upgrading to Pro](./pro/upgrading-to-pro.md) - Switch from OSS to Pro in three steps | ||||||
| - [Node Renderer: Container Deployment](./oss/building-features/node-renderer/container-deployment.md) (Pro) - Sidecar vs. separate workloads, memory tuning, troubleshooting | ||||||
|
|
||||||
| ## Friendly evaluation policy | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,7 +58,7 @@ can pass the redux option if you'd like to have redux setup for you automaticall | |
| Passing the --rsc generator option sets up React Server Components support. | ||
| This automatically includes Pro setup (--rsc implies --pro). Creates RSC | ||
| webpack configuration, a HelloServer example component, and RSC routes. | ||
| Requires React 19 with a compatible `react-on-rails-rsc` version. | ||
| Requires React 19.0.x. | ||
|
|
||
| ******************************************************************************* | ||
|
|
||
|
|
@@ -209,7 +209,7 @@ rails generate react_on_rails:install --pro | |
|
|
||
| **Prerequisites:** | ||
|
|
||
| - Add `gem 'react_on_rails_pro', '16.4.0'` (or later — pin to the exact version you want) to your Gemfile and run `bundle install` | ||
| - Add `gem 'react_on_rails_pro', '>= 16.3.0'` to your Gemfile and run `bundle install` | ||
| - Contact [justin@shakacode.com](mailto:justin@shakacode.com) for a license | ||
|
|
||
|
Comment on lines
+212
to
214
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clarify license wording so install prerequisites don’t imply a paid key is required for local usage. Line 213 reads like a prerequisite for setup, but Pro evaluation/development/testing/CI flows do not require a production paid license. Based on learnings: In React on Rails Pro, a license is NOT required for evaluation, development, testing, or CI; only production requires 🤖 Prompt for AI Agents |
||
| **What gets created:** | ||
|
|
@@ -246,7 +246,7 @@ For existing apps, use the standalone Pro generator to avoid re-processing base | |
| rails generate react_on_rails:pro | ||
| ``` | ||
|
|
||
| See the [React on Rails Pro overview](../../pro/home-pro.md) for feature details. | ||
| See the [React on Rails Pro overview](../../pro/react-on-rails-pro.md) for feature details. | ||
|
|
||
| ### React Server Components Support | ||
|
|
||
|
|
@@ -261,7 +261,7 @@ rails generate react_on_rails:install --rsc | |
| **Prerequisites:** | ||
|
|
||
| - React on Rails Pro gem installed (see Pro prerequisites above) | ||
| - React 19 with a compatible `react-on-rails-rsc` version | ||
| - React 19.0.x (RSC is not yet supported on React 19.1.x or later) | ||
|
|
||
| RSC builds on React on Rails Pro's Node rendering infrastructure. The generator adds a separate webpack entry point for server components, configures the `RSCWebpackPlugin` in both client and server webpack configs, and sets up the `RSC_BUNDLE_ONLY` environment variable handling in `ServerClientOrBoth.js` for independent RSC bundle compilation. | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use validator-floor minimums here, not CI-floor minimums.
Line 35 and Line 36 currently encode Ruby
3.2+and Node20+as strict prerequisites, which can cause agents to recommend unnecessary upgrades for environments that are still supported.Suggested doc fix
Based on learnings: In README and related docs, Ruby
>= 3.0and Node>= 18are intentional support floors, with CI-tested ranges documented separately.🤖 Prompt for AI Agents