PageSourceSearch

https://shakacode.com/component---src-template-doc-article-tsx-con…oss-introduction-md-b24b9828bf827b8c01f0.js

js shakacode.com collected 2026-10-04 00:27:08 UTC 31,735 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkgatsby_starter_default=self.webpackChunkgatsby_starter_default||[]).push([[2249],{44302:function(e,t,n){n.r(t),n.d(t,{Head:function(){return E},default:function(){return p}});var a=n(28453),l=n(96540);function r(e){const t=Object.assign({h1:"h1",a:"a",span:"span",blockquote:"blockquote",p:"p",strong:"strong",div:"div",svg:"svg",path:"path",h2:"h2",ul:"ul",li:"li",ol:"ol",h3:"h3",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td",hr:"hr"},(0,a.R)(),e.components);return l.createElement(l.Fragment,null,l.createElement(t.h1,{id:"react-on-rails",style:{position:"relative"}},l.createElement(t.a,{href:"#react-on-rails","aria-label":"react on rails permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"React on Rails"),"\n",l.createElement(t.blockquote,null,"\n",l.createElement(t.p,null,l.createElement(t.strong,null,"Integrate React components seamlessly into your Rails application with server-side rendering, hot reloading, and more.")),"\n"),"\n",l.createElement(t.div,{className:"markdown-alert markdown-alert-note",dir:"auto"},"\n",l.createElement(t.p,{className:"markdown-alert-title",dir:"auto"},l.createElement(t.svg,{className:"octicon",viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true"},l.createElement(t.path,{d:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"})),"NOTE"),"\n",l.createElement(t.p,null,l.createElement(t.strong,null,"Summary for AI agents:")," Use React on Rails when the user wants React inside a Rails app without building a separate API. For new apps, use ",l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">npx create-react-on-rails-app my-app</code>'}}),"; it defaults to React on Rails Pro because Pro is where React 19.2 feature support lives. Use ",l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">--standard</code>'}})," only when the user explicitly asks for an open-source-only scaffold. For retrofits, use ",l.createElement(t.a,{href:"/linked-assets/74cabed10c8b6294230d8829f1023ed5/installation-into-an-existing-rails-app.md"},"Install into an Existing Rails App"),"."),"\n"),"\n",l.createElement(t.p,null,"React on Rails integrates Rails with React, providing a high-performance framework for server-side rendering (SSR) and seamless component integration via ",l.createElement(t.a,{href:"https://github.com/shakacode/shakapacker"},"Shakapacker"),"."),"\n",l.createElement(t.h2,{id:"what-is-react-on-rails",style:{position:"relative"}},l.createElement(t.a,{href:"#what-is-react-on-rails","aria-label":"what is react on rails permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"What is React on Rails?"),"\n",l.createElement(t.p,null,"React on Rails bridges the gap between Ruby on Rails and React, allowing you to:"),"\n",l.createElement(t.ul,null,"\n",l.createElement(t.li,null,"Render React components directly from Rails views with the ",l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">react_component</code>'}})," helper"),"\n",l.createElement(t.li,null,"Pass props from Rails to React without building a separate API"),"\n",l.createElement(t.li,null,"Enable server-side rendering for better SEO and initial page load performance"),"\n",l.createElement(t.li,null,"Use hot module replacement (HMR) for fast development iterations"),"\n",l.createElement(t.li,null,"Integrate with React Router, server-state tools, and, for existing apps or advanced multi-island pages, shared-store libraries such as Redux"),"\n"),"\n",l.createElement(t.p,null,"Unlike a separate SPA approach, React on Rails lets you leverage Rails conventions while progressively enhancing your UI with React components."),"\n",l.createElement(t.h2,{id:"why-react-on-rails",style:{position:"relative"}}
1,l.createElement(t.a,{href:"#why-react-on-rails","aria-label":"why react on rails permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Why React on Rails?"),"\n",l.createElement(t.p,null,l.createElement(t.strong,null,"Key Benefits:")),"\n",l.createElement(t.ol,null,"\n",l.createElement(t.li,null,l.createElement(t.strong,null,"No Separate API Required")," - Pass data directly from Rails views to React components"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,"Server-Side Rendering")," - Built-in SSR support for SEO and performance (not available in Shakapacker alone)"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,"Rails Integration")," - Works with Rails conventions, asset pipeline, and existing apps"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,"Modern Tooling")," - Full Webpack, HMR, and NPM ecosystem support via Shakapacker"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,"Progressive Enhancement")," - Mix Rails views with React components on the same page"),"\n"),"\n",l.createElement(t.h2,{id:"when-to-use-react-on-rails",style:{position:"relative"}},l.createElement(t.a,{href:"#when-to-use-react-on-rails","aria-label":"when to use react on rails permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"When to Use React on Rails"),"\n",l.createElement(t.p,null,l.createElement(t.strong,null,"Choose React on Rails if:")),"\n",l.createElement(t.ul,null,"\n",l.createElement(t.li,null,"✅ You have an existing Rails application"),"\n",l.createElement(t.li,null,"✅ You want React's component model and ecosystem"),"\n",l.createElement(t.li,null,"✅ You need server-side rendering for SEO or performance"),"\n",l.createElement(t.li,null,"✅ You want to avoid building and maintaining a separate API"),"\n",l.createElement(t.li,null,"✅ You value Rails conventions and want tight integration"),"\n"),"\n",l.createElement(t.p,null,l.createElement(t.strong,null,"Consider alternatives if:")),"\n",l.createElement(t.ul,null,"\n",l.createElement(t.li,null,"❌ You're building a standalone SPA with a separate API backend"),"\n",l.createElement(t.li,null,"❌ You mainly want Rails-rendered HTML plus minimal JavaScript enhancements"),"\n",l.createElement(t.li,null,"❌ You want a page-oriented SPA shell instead of embedding React into Rails views"),"\n"),"\n",l.createElement(t.p,null,"If you're evaluating the tradeoffs, see ",l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/1618450adf0d9aa874910ba94a15d11c/comparing-react-on-rails-to-alternatives.md"},"Comparing React on Rails to alternatives"))," for a decision guide covering Hotwire, Inertia, Next.js, and more."),"\n",l.createElement(t.h2,{id:"getting-started",style:{position:"relative"}},l.createElement(t.a,{href:"#getting-started","aria-label":"getting started permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Getting Started"),"\n",l.createElement(t.p,null,"Choose your path based on your situation:"),"\n",l.createElement(t.h3,{id:"-new-to-react-on-rails",style:{position:"relative"}}
1,l.createElement(t.a,{href:"#-new-to-react-on-rails","aria-label":" new to react on rails permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"🚀 New to React on Rails?"),"\n",l.createElement(t.p,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/003dda5637dff40325151da874e99757/quick-start.md"},"15-Minute Quick Start →"))),"\n",l.createElement(t.p,null,"Get your first component running in minutes. Perfect for exploring React on Rails quickly."),"\n",l.createElement(t.h3,{id:"-adding-to-an-existing-rails-app",style:{position:"relative"}},l.createElement(t.a,{href:"#-adding-to-an-existing-rails-app","aria-label":" adding to an existing rails app permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"📦 Adding to an Existing Rails App?"),"\n",l.createElement(t.p,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/74cabed10c8b6294230d8829f1023ed5/installation-into-an-existing-rails-app.md"},"Installation Guide →"))),"\n",l.createElement(t.p,null,"Detailed integration instructions for existing Rails applications with Shakapacker."),"\n",l.createElement(t.h3,{id:"-want-a-comprehensive-tutorial",style:{position:"relative"}},l.createElement(t.a,{href:"#-want-a-comprehensive-tutorial","aria-label":" want a comprehensive tutorial permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"📚 Want a Comprehensive Tutorial?"),"\n",l.createElement(t.p,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/354d815a359bf3bdc98e98fd4de2cc4a/tutorial.md"},"Complete Tutorial →"))),"\n",l.createElement(t.p,null,"Step-by-step walkthrough building a TypeScript component with hooks, server rendering, and deployment guidance."),"\n",l.createElement(t.h3,{id:"-learn-by-example",style:{position:"relative"}},l.createElement(t.a,{href:"#-learn-by-example","aria-label":" learn by example permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"👀 Learn by Example?"),"\n",l.createElement(t.ul,null,"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/e820293f6c8f0c36f17798387c43d61d/examples-and-references.md"},"Examples and references"))," - Start with the current Pro starter for React 19.2 support, then use baseline and migration repos when that is the explicit goal."),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"https://github.com/shakacode/react_on_rails/tree/main/react_on_rails/spec/dummy"},"Spec/Dummy App"))," - In-repo reference for current generator and test behavior."),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"https://www.reactrails.com"},"Live demo at www.reactrails.com"))," - Running React on Rails app you can click through without local setup"),"\n"),"\n",l.createElement(t.h2,{id:"popular-use-cases",style:{position:"relative"}}
1,l.createElement(t.a,{href:"#popular-use-cases","aria-label":"popular use cases permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Popular Use Cases"),"\n",l.createElement(t.p,null,"Find guidance for your specific scenario:"),"\n",l.createElement(t.table,null,l.createElement(t.thead,null,l.createElement(t.tr,null,l.createElement(t.th,null,"I want to..."),l.createElement(t.th,null,"Go here"))),l.createElement(t.tbody,null,l.createElement(t.tr,null,l.createElement(t.td,null,l.createElement(t.strong,null,"Add React to existing Rails app")),l.createElement(t.td,null,l.createElement(t.a,{href:"/linked-assets/74cabed10c8b6294230d8829f1023ed5/installation-into-an-existing-rails-app.md"},"Installation Guide"))),l.createElement(t.tr,null,l.createElement(t.td,null,l.createElement(t.strong,null,"Compare Rails + frontend options")),l.createElement(t.td,null,l.createElement(t.a,{href:"/linked-assets/1618450adf0d9aa874910ba94a15d11c/comparing-react-on-rails-to-alternatives.md"},"Comparison Guide"))),l.createElement(t.tr,null,l.createElement(t.td,null,l.createElement(t.strong,null,"Enable server-side rendering")),l.createElement(t.td,null,l.createElement(t.a,{href:"/linked-assets/54e45a146503a9194b6540e0b1fa8747/react-server-rendering.md"},"SSR Guide"))),l.createElement(t.tr,null,l.createElement(t.td,null,l.createElement(t.strong,null,"Set up hot reloading")),l.createElement(t.td,null,l.createElement(t.a,{href:"/linked-assets/90c43285d3b6b2e6f76883fd72e5f658/hmr-and-hot-reloading-with-the-webpack-dev-server.md"},"HMR Setup"))),l.createElement(t.tr,null,l.createElement(t.td,null,l.createElement(t.strong,null,"Use legacy shared Redux stores")),l.createElement(t.td,null,l.createElement(t.a,{href:"/linked-assets/2f0154b5e3076e8a08496dd06ab9dc24/react-and-redux.md"},"Legacy Redux Guidance"))),l.createElement(t.tr,null,l.createElement(t.td,null,l.createElement(t.strong,null,"Use TanStack Router")),l.createElement(t.td,null,l.createElement(t.a,{href:"/linked-assets/5d15d8312c91a8470909504615d8f507/tanstack-router.md"},"TanStack Router Guide"))),l.createElement(t.tr,null,l.createElement(t.td,null,l.createElement(t.strong,null,"Deploy to production")),l.createElement(t.td,null,l.createElement(t.a,{href:"/linked-assets/1346495fa092ab72b9aa0331bcbb2e4e/README.md"},"Deployment Guide"))),l.createElement(t.tr,null,l.createElement(t.td,null,l.createElement(t.strong,null,"Troubleshoot issues")),l.createElement(t.td,null,l.createElement(t.a,{href:"/linked-assets/84e0ce93d0c37952eac8de9289f9e3d1/troubleshooting.md"},"Troubleshooting"))))),"\n",l.createElement(t.h2,{id:"core-concepts",style:{position:"relative"}},l.createElement(t.a,{href:"#core-concepts","aria-label":"core concepts permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Core Concepts"),"\n",l.createElement(t.p,null,"Before building features, understand these fundamentals:"),"\n",l.createElement(t.ul,null,"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/56308940ea776e3640302de777ee897b/how-react-on-rails-works.md"},"How React on Rails Works"))," - Architecture overview"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/68f6de8da33e5ea5631565673247b660/auto-bundling-file-system-based-automated-bundle-generation.md"},"Auto-Bundling"))," - Automatic component registration and bundle generation"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/a246a38c35234402e2529f692e7b4644/client-vs-server-rendering.md"}
1,"Client vs Server Rendering"))," - When to use each"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/e72e5d49cb555fd964cbc7e46abdb41b/webpack-configuration.md"},"Webpack Configuration"))," - Customizing your build"),"\n"),"\n",l.createElement(t.h2,{id:"philosophy",style:{position:"relative"}},l.createElement(t.a,{href:"#philosophy","aria-label":"philosophy permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Philosophy"),"\n",l.createElement(t.p,null,"React on Rails follows the ",l.createElement(t.strong,null,l.createElement(t.a,{href:"https://rubyonrails.org/doctrine"},"Rails Doctrine"))," and extends it to modern JavaScript development:"),"\n",l.createElement(t.ul,null,"\n",l.createElement(t.li,null,l.createElement(t.strong,null,"Convention over Configuration")," - Sensible defaults for JavaScript tooling with Rails"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,"Optimize for Programmer Happiness")," - Hot reloading, ES6+, CSS modules, NPM ecosystem"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,"Value Integrated Systems")," - Tight Rails integration beats separate microservices for most apps"),"\n"),"\n",l.createElement(t.p,null,"Read the full ",l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/66eeb9748cf28721c289a0b6eafbd912/doctrine.md"},"React on Rails Doctrine"))," for our design philosophy."),"\n",l.createElement(t.h2,{id:"system-requirements",style:{position:"relative"}},l.createElement(t.a,{href:"#system-requirements","aria-label":"system requirements permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"System Requirements"),"\n",l.createElement(t.ul,null,"\n",l.createElement(t.li,null,l.createElement(t.strong,null,"Rails 7.0+")," (Ruby 3.3+ is incompatible with Rails < 7.0; CI tests against Rails 7.2)"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,"Ruby 3.3+")),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,"Node.js 18+")," (React on Rails Pro's Node renderer defaults to Fastify 5 and requires ",l.createElement(t.strong,null,"Node.js 20+")," at startup;\nits ",l.createElement(t.strong,null,"Node.js 18.19.0+")," ",l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">engines.node</code>'}})," floor applies with the documented Fastify 4-compatible dependency overrides)"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,"Shakapacker 6+")," (7+ recommended for React on Rails v17)"),"\n"),"\n",l.createElement(t.h2,{id:"need-help",style:{position:"relative"}},l.createElement(t.a,{href:"#need-help","aria-label":"need help permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Need Help?"),"\n",l.createElement(t.h3,{id:"community-support",style:{position:"relative"}}
1,l.createElement(t.a,{href:"#community-support","aria-label":"community support permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Community Support"),"\n",l.createElement(t.ul,null,"\n",l.createElement(t.li,null,l.createElement(t.strong,null,"Active Community")," - ",l.createElement(t.a,{href:"https://publicwww.com/websites/%22react-on-rails%22++-undeveloped.com+depth%3Aall/"},"Thousands of production sites use React on Rails")),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"https://github.com/shakacode/react_on_rails/discussions"},"React on Rails Discussions"))," - Ask questions and share knowledge"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"https://reactrails.slack.com"},"React + Rails Slack"))," - Real-time community help"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"https://github.com/shakacode/react_on_rails/issues"},"GitHub Issues"))," - Report bugs"),"\n"),"\n",l.createElement(t.h3,{id:"professional-support",style:{position:"relative"}},l.createElement(t.a,{href:"#professional-support","aria-label":"professional support permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Professional Support"),"\n",l.createElement(t.ul,null,"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/5f3eacdd52b97cebdce257aa7836a6e1/react-on-rails-pro.md"},"React on Rails Pro"))," - Advanced features (React Server Components, Suspense SSR, streaming)"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"mailto:[email protected]"},"ShakaCode Consulting"))," - Expert help with React on Rails projects"),"\n"),"\n",l.createElement(t.h2,{id:"external-resources",style:{position:"relative"}},l.createElement(t.a,{href:"#external-resources","aria-label":"external resources permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"External Resources"),"\n",l.createElement(t.ul,null,"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"https://github.com/shakacode/shakapacker"},"Shakapacker Documentation"))," - Webpack integration for Rails (required)"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"https://react.dev"},"React Documentation"))," - Official React documentation"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"https://guides.rubyonrails.org"},"Rails Guides"))," - Ruby on Rails documentation"),"\n"),"\n",l.createElement(t.h2,{id:"contributing",style:{position:"relative"}}
1,l.createElement(t.a,{href:"#contributing","aria-label":"contributing permalink",className:"anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}})),"Contributing"),"\n",l.createElement(t.ul,null,"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/66eeb9748cf28721c289a0b6eafbd912/doctrine.md"},"React on Rails Doctrine"))," - Our design philosophy"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/98d3c25208975af7d1187adba0b1d6ec/style.md"},"Code Style"))," - Coding style guidelines"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/1bc5094a97fd6f98db053fd862f4778a/updating-dependencies.md"},"Updating Dependencies"))," - How to keep Ruby and JS dependencies current"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/5a97dd8d7b276c61efe3fdcc15292996/credits.md"},"Credits"))," - Authors and contributors"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/0fbaa875ac18c9136e1c421a3b871a1b/articles.md"},"Articles, Videos, and Podcasts"))," - Community content"),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/linked-assets/e4cda18ab66e3fcda78cb83e02971c91/tips.md"},"Tips"))," - Practical tips for working with React on Rails"),"\n"),"\n",l.createElement(t.hr),"\n",l.createElement(t.p,null,l.createElement(t.strong,null,"Ready to start?")," Pick your path above and let's build something great! 🚀"))}var i=function(e){void 0===e&&(e={});const{wrapper:t}=Object.assign({},(0,a.R)(),e.components);return t?l.createElement(t,e,l.createElement(r,e)):r(e)},s=n(63679),c=n(95197),o=n(47388),d=n(23690),m=n(14487);const h=s.default.p.withConfig({displayName:"doc-article__RedirectFallback",componentId:"sc-tic2w5-0"})(["padding:2rem;"]),u=e=>{let{data:t,location:n,children:a}=e;const{headings:r}=t.article.childMdx,i=(0,c.X9)(n.pathname),[s,d]=l.useState(null),u=n.pathname.split("/"),p=u.indexOf("docs"),E=-1===p?n.pathname.length:u.slice(0,p+1).join("/").length,g=n.pathname.slice(0,E),f=n.pathname.slice(E+1).replace(/\/$/,"").split("/").filter((e=>""!==e)),v=f.length>1?f.slice(0,-1).join("/"):"";l.useEffect((()=>{if(!i)return;const{hash:e}=window.location;d(e);const t=""+i+e;window.location.href!==t&&window.location.replace(t)}),[i]);const b=null===i||null===s?null:""+i+s;return l.createElement(l.Fragment,null,null!==b?l.createElement(h,{role:"status","aria-live":"polite"},"Redirecting..."," ",l.createElement("a",{href:b,target:"_blank",rel:"noopener noreferrer"},"Click here if not redirected.")):l.createElement(o.A,{main:l.createElement(m.A,{body:a,headings:r,transformUrl:e=>{if(e.startsWith("http")||e.startsWith("#"))return e;const t=e.replace(/\.md$/,"/");if(t.startsWith("./"))return g+(""===v?"":"/"+v)+t.slice(1);if(t.startsWith("../")){if(""===v)return""+g+t.slice(2);const e=v.split("/").slice(0,-1).join("/");return g+(""===e?"":"/"+e)+t.slice(2)}return g+"/"+(""===v?"":v+"/")+t}})}))};function p(e){return l.createElement(u,e,l.createElement(i,e))}const E=e=>{let{data:t,location:n,pageContext:a}=e;const{headings:r}=t.article.childMdx,{siteUrl:i}=t.site.siteMetadata,{repoDisplayName:s}=a,o=r.find((e=>1===e.depth)),m=(0,c.X9)(n.pathname)||""+i.replace(/\/+$/,"")+n.pathname;return l.createElement(d.A,{title:o?o.value:s,description:o?o.value:s+" documentation",isArticle:!0,canonical:m,pathname:n.pathname})}}}]);
2//# sourceMappingURL=component---src-template-doc-article-tsx-content-file-path-cache-gatsby-source-git-react-on-rails-docs-oss-introduction-md-b24b9828bf827b8c01f0.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.