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.
Server components can access databases, file systems, and internal APIs directly without exposing endpoints to the client. This simplifies data fetching and eliminates the need for client-side data fetching libraries in many cases.
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: