React on Rails 17.0.0 Release Notes
Upgrading from 16.x to 17.0.0
Update your gem and npm package versions:
# Gemfile
gem "react_on_rails", "17.0.0"
// package.json
{
"dependencies": {
"react-on-rails": "17.0.0"
}
}
Pro users: Use react-on-rails-pro instead of react-on-rails in package.json, and react_on_rails_pro instead of react_on_rails in your Gemfile. See the Pro upgrade guide for details.
Then run bundle install and your package manager's install command.
Important: Read the Upgrading to v17 guide for detailed migration steps.
Highlights
This is a major release with significant new features for both open-source and Pro users, alongside breaking changes that require attention during upgrade. See the CHANGELOG for the full list of changes.
Breaking Changes
-
Ruby 3.3+ is required. The open-source gem now requires Ruby >= 3.3.0, aligning it with React on Rails Pro,
create-react-on-rails-app, and the CI minimum matrix. React on Rails v16 remains the upgrade path for applications that must stay on Ruby 3.2 or older. PR 3500. -
Four configuration options were removed. Three were deprecated in v16, while
config.server_render_methodwas inert. All four are gone in v17. Setting any of them now raisesNoMethodErrorat boot. Runbin/rake react_on_rails:doctorto detect any that remain in your initializer.config.generated_assets_dirs— delete the lineconfig.skip_display_none— delete the lineconfig.defer_generated_component_packs— replace withconfig.generated_component_packs_loading_strategyconfig.server_render_method— delete the line See the upgrade guide for full migration details. PR 4423, PR 4432.
-
[Pro] Removed the undocumented
ReactOnRailsPro::Cache.fetch_react_componentclass API. Pro apps should use the supported cached helper APIs (cached_react_component,cached_react_component_hash, and related helpers) instead of calling the low-level cache class directly. PR 4541. -
[Pro] React Server Components now require the stable React 19.2.x RSC line. Pro RSC apps on v17 require
react-on-rails-rsc >= 19.2.1 < 19.3, React >= 19.2.7, and matching React DOM. Non-RSC Pro apps retain React 18 support. PR 4490, PR 4670. -
Removed the
RenderRequest/JsCodeBuilder/RenderingStrategyrendering layer. These internal classes were built for a strategy-pattern refactor that was never wired in. Remove any application references. PR 4437. -
Removed undocumented
ReactOnRails::Utilshelpers.server_rendering_is_enabled?andrails_version_less_thanare gone. Remove any application calls. PR 4431. -
[Pro] Node Renderer now requires Ruby 3.3+ for the async-http transport. The
react-on-rails-progem requires Ruby >= 3.3 (raised from >= 3.0) becauseasync-httpdepends on Ruby 3.3 features. PR 3320. -
[Pro]
config.renderer_http_pool_sizesemantics changed. Existing numeric values now cap concurrent async-http connections for each renderer client instead of sizing a persistent process-wide connection pool.nilkeeps the default and does not make the client unlimited. PR 3320. -
Breaking (types only):
RenderFunctionno longer accepts the legacy 3-argument renderer shape. UseRendererFunctionfor 3-argument renderers.ReactComponentOrRenderFunctionstill includesRendererFunction. PR 4096.
New Features
hydrate_onscheduling:react_componentnow acceptshydrate_on:to defer client hydration —:immediate(default),:visible(IntersectionObserver), or:idle(requestIdleCallback). Deferred roots are cleaned up on Turbo navigation and re-scheduled if detached and reattached. See Hydration Scheduling. PR 4037.- Font optimization helper: New
react_on_rails_font_faceview helper — React on Rails' equivalent of Next.jsnext/font/local. Generates<head>markup with preload,@font-face, and optional metric-matched fallback for zero-CLS font swaps. See Font Optimization. PR 3923. useRailsFormhook +render_model_errors: An InertiauseForm-style bridge to Rails controllers.data/setData, per-fielderrors, submit verbs, automatic CSRF attachment, and aFormRespondersconcern for ActiveModel validation rendering. See Forms and Mutations. PR 3942.- Generated TypeScript response contracts:
rake react_on_rails:generate_response_typesemits importable.d.tsdeclarations plus aRailsResponseTypeslookup map for TanStack Query clients. See Generated Rails Response Types. PR 4259. createRailsActionfor TanStack Query mutations: Thereact-on-rails/railsActionsubpath export provides a same-origin JSON caller with Rails CSRF headers and typed responses. PR 4260.- React 19 root error callbacks:
ReactOnRails.setOptions({ rootErrorHandlers: { onRecoverableError, onCaughtError, onUncaughtError } })registers React's root error callbacks globally. See Debugging Hydration Mismatches. PR 3933. - Owner Stacks in development error reports: React on Rails enriches development error reporting with React 19.1+'s
captureOwnerStack— the chain of components that rendered the failing one. Requires React >= 19.1 development build. PR 4089. react_on_rails_preload_links: Emit preload/modulepreload tags for auto-bundled component packs from the Shakapacker manifest. PR 3935.- Machine-readable doctor output:
FORMAT=jsonemits a stable, versioned JSON report for coding agents and tooling. PR 3948. - Tailwind CSS v4 generator option:
--tailwindinstalls Tailwind CSS v4 with extracted component CSS support. PR 3937. - Consumer-facing AI-agent guidance: The install generator writes
AGENTS.md,CLAUDE.md,.cursor/rules/react-on-rails.mdc, and.github/copilot-instructions.mdso AI coding agents understand the project. Controlled by--agent-files/--no-agent-files(default on). See Generator Details. PR 3924. install_rsc_agent_guardrailsrake task:rake react_on_rails:install_rsc_agent_guardrailsinstalls anrsc-app-safetyClaude Code skill and advisory hook into the app's.claude/directory. The skill helps AI agents understand RSC boundaries and the advisory hook warns before risky RSC changes. Re-running after an upgrade is safe. Also runs automatically from the RSC generator.- Version-matched agent skills in gem/npm: Four skills —
install-and-upgrade,rsc-adoption,streaming-debug,doctor-fix-loop— ship inside thereact_on_railsgem andreact-on-railsnpm package, and generatedAGENTS.mdfiles point at them. PR 4809. bin/dev clean: Clears generated bundles and caches — stops development processes, removes Shakapacker output and cache paths, and cleans common Rails/JS/renderer caches. PR 4218.bin/devdeterministic port allocation: SetREACT_ON_RAILS_BASE_PORT(orCONDUCTOR_PORT) andbin/devderives Rails/webpack/renderer ports automatically:base+0,base+1,base+2. See Process Managers. PR 3142.- Stable SmartError codes: Error messages include
ROR###codes with canonical documentation URLs. See Error Reference. PR 3936. react-on-rails/webpackHelperssubpath export: ProvidesreactDomClientWarningto suppress the harmlessModule not found: Can't resolve 'react-dom/client'warning on React 16/17. PR 3358.
Pro Features
- React 18 support for non-RSC streaming SSR:
stream_react_componentwith synchronous props now works on React 18 as well as React 19. Async props and RSC remain React 19-only. PR 4658. - Buffered RSC rendering:
buffered_stream_react_componentandcached_buffered_stream_react_componentrender through the Pro streaming/RSC renderer while returning complete HTML to Rails, so static/cacheable pages can avoidActionController::Live. PR 4268. cached_static_rsc_component: Caches stripped static RSC HTML for public pages that skip the generated page pack. PR 4386.- RSC stream observability: Opt-in browser performance marks for stream completion, Flight payload chunks, hydration start, and first interactive effects. Plus
Server-Timingheader withror_stream_shellmetric. PR 4222, PR 4251. - Bidirectional async props (pull mode):
stream_react_component_with_async_propscan let React request lazy props during incremental rendering, complementing the existing push model. See Streaming SSR. PR 4048. - Tag-based cache revalidation: Fragment-caching helpers accept
cache_tags:andReactOnRailsPro.revalidate_tag(tag)deletes entries via a tag→key index. IncludesRevalidatesActiveRecord concern. See Fragment Caching. PR 3964. prefetchServerComponent: Client-router loaders can warm a prefetch store thatRSCProvideradopts on the nextRSCRouterender. PR 4489.async_react_component/cached_async_react_component: Render components asynchronously for deferred page insertion, with optional fragment caching.- Node renderer
/healthand/readyendpoints: First-class liveness and readiness probes, enabled withenableHealthEndpointsconfig orRENDERER_ENABLE_HEALTH_ENDPOINTS=true. See Health Checks. PR 3939. - Source-mapped stack traces: SSR errors now point at original TypeScript/JavaScript positions instead of bundled positions. Uses Node's built-in
module.SourceMap. PR 3940. - OpenTelemetry integration: Optional integration at
react-on-rails-pro-node-renderer/integrations/opentelemetrywith distributed tracing, SSR root spans, and render-path sub-spans. PR 3382. - HTTP rolling-deploy adapter + auto-mount:
ReactOnRailsPro::RollingDeployAdapters::Httpserves previously-deployed bundles directly from the Rails server — no S3 required. Auto-mounts atconfig.rolling_deploy_mount_path. See Rolling Deploy Adapters. PR 3379, PR 3504. <RSCRoute>imperative refetch:refexposesrefetch()viaRSCRouteHandle;useCurrentRSCRoute()hook for client components inside the RSC subtree. PR 3552.<RSCRoute ssr={false}>: Defers initial RSC payload generation — the server streams the Suspense fallback and the client fetches the payload. PR 3318.unstable_cachefor RSC: Experimental fragment caching withCacheHandlerinterface, in-memory LRU default,RedisCacheHandlerfor L2,TieredCacheHandlerfor L1/L2, andunstable_revalidateTagacross workers. PR 3325, PR 3705.- RSC manifest client reference discovery: Generated RSC configs run
RSCReferenceDiscoveryPluginduring precompile to emitrsc-client-references.json. PR 3556.
Changes
- Generator defaults to Rspack for fresh installs (significantly faster builds via SWC). Pass
--no-rspackor--webpackfor Webpack. PR 3484. create-react-on-rails-appdefaults to Pro: Running without flags now generates the recommended Pro scaffold. Add--standardfor OSS-only. PR 4217.- Redux hidden from install generator:
--reduxis no longer shown in help text. The runtime Redux APIs remain available. PR 4277. - Node Renderer HTTP transport migrated from HTTPX to
async-http:ssr_timeoutis now a per-read socket timeout;renderer_http_pool_timeoutis now the TCP connect timeout. See Pro Upgrade Guide. PR 3320. - Node Renderer entry point moved to
renderer/node-renderer.js: New canonical location, separate fromclient/. Existing apps withclient/node-renderer.jsare unaffected. PR 3165. - Docs standardized on
REACT_RENDERER_URLenv var: The olderRENDERER_URLis still supported.bin/devwarns whenRENDERER_URLis set withoutREACT_RENDERER_URL. PR 3142. renderer_http_keep_alive_timeoutis deprecated: The async-http adapter manages connection lifecycle automatically. Remove the line from yourconfigureblock. PR 3320.
Bug Fixes
Numerous bug fixes for RSC streaming, payload caching, error boundaries, hydration scheduling, and more. See the CHANGELOG for the complete list.