docs/pro/react-server-components/index.md
Pro Feature — React Server Components require React on Rails Pro with the node renderer. Free or very low cost for startups and small companies. Upgrade or licensing details →
[!NOTE] Summary for AI agents: Use this page when the user explicitly wants React Server Components or an RSC migration path. It routes to the tutorial, deep dives, and migration guides. Treat RSC as a Pro-only feature that runs with the Node renderer.
React Server Components (RSC) allow you to write components that execute on the server and stream their rendered output to the client. Unlike traditional server-side rendering, which renders the entire page to a string before sending it, RSC streams individual component trees progressively and keeps server-only dependencies out of the client bundle entirely.
With React on Rails Pro, RSC integrates directly into your Rails application:
stream_react_component, rsc_payload_react_component) manage the streaming lifecycle'use client' directives and generates the correct registrationsServer components and their dependencies never ship to the browser. Libraries like date-fns, marked, or sanitize-html stay entirely server-side, reducing bundle sizes significantly. Frigade reported a 62% reduction in client-side bundle size after adopting RSC.
Combined with streaming SSR, RSC sends the initial HTML shell immediately while data-dependent components resolve and stream in progressively. Users see content sooner, and search engines can index the full page.
React's selective hydration allows client components to become interactive independently as their code loads, rather than waiting for the entire page's JavaScript to execute. Components that users interact with get priority hydration.
In React on Rails, Rails is the backend: your controller owns database access, authorization, and caching, then passes data to the component tree as props (or streams slow data as async props). Server components render from that data without exposing API endpoints to the client or shipping client-side data-fetching libraries. Unlike Next.js-style RSC, components don't fetch their own data — see RSC Data Fetching Patterns.
Teams adopting RSC have reported dramatic wins — BlogHunch's 30% server-cost reduction, Frigade's 62% client-bundle reduction, and Mux's 50,000-line incremental migration — all documented in Migration Success Stories. DoorDash's 65% LCP improvement from an earlier Next.js SSR migration is included as a useful server-rendering baseline.
The Marketplace demo below shows how these ideas look in an inspectable React on Rails Pro application.
The public Marketplace demo shows the same marketplace-style surfaces rendered with traditional SSR, client rendering, and React Server Components. Use this canonical link list when you want inspectable proof instead of a static claim:
[!NOTE] Treat these public measurements as directional evidence, not a universal performance guarantee for every app.
Current React on Rails Pro releases provide full RSC support with:
react-on-rails-rsc/WebpackLoader) for server/client component separationreact-on-rails-rsc/WebpackPlugin) for client manifest generation'use client' directivesreact-on-rails-rsc versionreact-on-rails-pro-node-renderer npm package (see Pro Installation)Start with the tutorial series, which builds from basics to advanced features:
See the full RSC tutorial for the complete learning path.
See Upgrading an Existing Pro App to RSC for the generator-based runbook: prerequisites, rails g react_on_rails:rsc usage, legacy webpack compatibility, and a verification checklist.
The migration guide covers how to incrementally adopt RSC in an existing React on Rails application, including: