{"id":13394985,"url":"https://github.com/shakacode/react_on_rails","last_synced_at":"2025-05-12T00:55:55.725Z","repository":{"id":36810659,"uuid":"41117523","full_name":"shakacode/react_on_rails","owner":"shakacode","description":"Integration of React + Webpack + Rails + rails/webpacker including server-side rendering of React, enabling a better developer experience and faster client performance.","archived":false,"fork":false,"pushed_at":"2025-05-11T21:30:40.000Z","size":12172,"stargazers_count":5152,"open_issues_count":25,"forks_count":636,"subscribers_count":76,"default_branch":"master","last_synced_at":"2025-05-12T00:55:46.546Z","etag":null,"topics":["heroku-deployment","javascript-api","npm-module","rails-development","rails-views","react","react-components","react-rails","redux","redux-saga","redux-store","ruby-gem","ruby-on-rails","shakacode","webpack"],"latest_commit_sha":null,"homepage":"https://www.shakacode.com/react-on-rails/docs/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shakacode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["shakacode"]}},"created_at":"2015-08-20T20:31:54.000Z","updated_at":"2025-05-11T16:06:44.000Z","dependencies_parsed_at":"2024-01-17T02:15:33.047Z","dependency_job_id":"e4998cb7-09f4-4674-bb22-da742951a56a","html_url":"https://github.com/shakacode/react_on_rails","commit_stats":{"total_commits":1646,"total_committers":229,"mean_commits":7.187772925764192,"dds":0.4149453219927096,"last_synced_commit":"5c962fcfcf96d20e4626c8fa495adb7c58747a64"},"previous_names":[],"tags_count":239,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakacode%2Freact_on_rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakacode%2Freact_on_rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakacode%2Freact_on_rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakacode%2Freact_on_rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shakacode","download_url":"https://codeload.github.com/shakacode/react_on_rails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253655955,"owners_count":21943081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["heroku-deployment","javascript-api","npm-module","rails-development","rails-views","react","react-components","react-rails","redux","redux-saga","redux-store","ruby-gem","ruby-on-rails","shakacode","webpack"],"created_at":"2024-07-30T17:01:38.259Z","updated_at":"2025-05-12T00:55:55.702Z","avatar_url":"https://github.com/shakacode.png","language":"Ruby","funding_links":["https://github.com/sponsors/shakacode"],"categories":["Utilities","Uncategorized","Ruby","Ruby on Rails Resources","Gems"],"sub_categories":["Framework bindings / integrations","Uncategorized","Chrome Extensions","Articles"],"readme":"![reactrails](https://user-images.githubusercontent.com/10421828/79436261-52159b80-7fd9-11ea-994e-2a98dd43e540.png)\n\n\u003cp align=\"center\"\u003e\n \u003ca href=\"https://shakacode.com/\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/10421828/79436256-517d0500-7fd9-11ea-9300-dfbc7c293f26.png\"\u003e\u003c/a\u003e\n \u003ca href=\"https://forum.shakacode.com/\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/10421828/79436266-53df5f00-7fd9-11ea-94b3-b985e1b05bdc.png\"\u003e\u003c/a\u003e\n \u003ca href=\"https://www.shakacode.com/react-on-rails-pro\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/10421828/79436265-53df5f00-7fd9-11ea-8220-fc474f6a856c.png\"\u003e\u003c/a\u003e\n \u003ca href=\"https://github.com/sponsors/shakacode\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/10421828/79466109-cdd90d80-8004-11ea-88e5-25f9a9ddcf44.png\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n[![License](https://img.shields.io/badge/license-mit-green.svg)](LICENSE.md)[![Gem Version](https://badge.fury.io/rb/react_on_rails.svg)](https://badge.fury.io/rb/react_on_rails) [![npm version](https://badge.fury.io/js/react-on-rails.svg)](https://badge.fury.io/js/react-on-rails) [![Code Climate](https://codeclimate.com/github/shakacode/react_on_rails/badges/gpa.svg)](https://codeclimate.com/github/shakacode/react_on_rails) [![Coverage Status](https://coveralls.io/repos/shakacode/react_on_rails/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/shakacode/react_on_rails?branch=master) [![](https://ruby-gem-downloads-badge.herokuapp.com/react_on_rails?type=total)](https://rubygems.org/gems/react_on_rails)\n\n[![Build Main](https://github.com/shakacode/react_on_rails/actions/workflows/main.yml/badge.svg)](https://github.com/shakacode/react_on_rails/actions/workflows/main.yml)\n[![Build JS Tests](https://github.com/shakacode/react_on_rails/actions/workflows/package-js-tests.yml/badge.svg)](https://github.com/shakacode/react_on_rails/actions/workflows/package-js-tests.yml)\n[![Build Rspec Tests](https://github.com/shakacode/react_on_rails/actions/workflows/rspec-package-specs.yml/badge.svg)](https://github.com/shakacode/react_on_rails/actions/workflows/rspec-package-specs.yml)\n[![Linting](https://github.com/shakacode/react_on_rails/actions/workflows/lint-js-and-ruby.yml/badge.svg)](https://github.com/shakacode/react_on_rails/actions/workflows/lint-js-and-ruby.yml)\n\n# News\n\n- [React on Rails Pro](https://www.shakacode.com/react-on-rails-pro/) supports the latest features of React 18, including [React Server Components](https://react.dev/reference/rsc/server-components) and [streaming](https://react.dev/reference/react-dom/server/renderToPipeableStream). Contact [Justin Gordon](mailto:justin@shakacode.com) for more information.\n- ShakaCode now maintains the official successor to `rails/webpacker`, [`shakapacker`](https://github.com/shakacode/shakapacker).\n- Project is updated to support Rails 7 and Shakapacker v6+!\n\n---\n\n_These are the docs for React on Rails 14. To see the older docs and code: [v13](https://github.com/shakacode/react_on_rails/tree/13.4.0), [v12](https://github.com/shakacode/react_on_rails/tree/12.6.0), and [v11](https://github.com/shakacode/react_on_rails/tree/11.3.0)._\n\n# About\n\nReact on Rails integrates Rails with (server rendering of) [React](https://github.com/facebook/react).\n\nThis project is maintained by [ShakaCode](https://www.shakacode.com).\n\n## ShakaCode Upgrade Support\n\nShakaCode focuses on helping Ruby on Rails teams better use React and Webpack. We can upgrade your project and improve your development and customer experiences, allowing you to focus on building new features or fixing bugs instead.\n\nFor an overview of working with us, see our [Client Engagement Model](https://www.shakacode.com/blog/client-engagement-model/) article and [how we bill for time](https://www.shakacode.com/blog/shortcut-jira-trello-github-toggl-time-and-task-tracking/).\n\nWe also specialize in helping development teams lower infrastructure and CI costs. Check out our project [Control Plane Flow](https://github.com/shakacode/control-plane-flow/), which can allow you to get the ease of Heroku with the power of Kubernetes and big cost savings.\n\nIf you think ShakaCode can help your project, [click here](https://meetings.hubspot.com/justingordon/30-minute-consultation) to book a call with [Justin Gordon](mailto:justin@shakacode.com), the creator of React on Rails.\n\n## React on Rails Pro\n\nAre you interested in optimizing your Webpack setup for React on Rails, including code splitting with [React Router](https://reactrouter.com/) and [loadable-components](https://loadable-components.com/) with server-side rendering for SEO and hot-reloading for developers?\nWe did this for Popmenu, [lowering Heroku costs 20-25% while getting a 73% decrease in average response times](https://www.shakacode.com/recent-work/popmenu/). Several years later, Popmenu serves tens of millions of SSR requests daily with React on Rails Pro.\n\nIf you're interested, read more about [React on Rails Pro](https://www.shakacode.com/react-on-rails-pro/) and [book a call](https://meetings.hubspot.com/justingordon/30-minute-consultation).\n\n# Documentation\n\nSee the documentation at **[shakacode.com/react-on-rails/docs](https://www.shakacode.com/react-on-rails/docs/)**.\n\n## Project Objective\n\nTo provide a high-performance framework for integrating Ruby on Rails with React, especially regarding React Server-Side Rendering for better SEO and improved performance.\n\n## Features and Why React on Rails?\n\nGiven that `shakacode/shakapacker` gem already provides basic React integration, why would you use \"React on Rails\"?\n\n1. Automatic configuration of what bundles are added to the page based on what React components are on the page. This results in faster browser loading time via smaller bundle sizes.\n1. Keep up with the latest changes in different versions of React. React 18 is supported.\n1. Easy passing of props directly from your Rails view to your React components rather than having your Rails view load and then make a separate request to your API.\n   Tight integration with [shakapacker](https://github.com/shakacode/shakapacker) (or its predecessor [rails/webpacker](https://github.com/rails/webpacker)).\n1. Server-Side Rendering (SSR), often used for SEO crawler indexing and UX performance.\n1. [Automated optimized entry-point creation and bundle inclusion when placing a component on a page. With this feature, you no longer need to configure `javascript_pack_tags` and `stylesheet_pack_tags` on your layouts based on what’s shown. “It just works!”](https://www.shakacode.com/react-on-rails/docs/guides/file-system-based-automated-bundle-generation/)\n1. [Redux](https://redux.js.org/) and [React Router](https://reactrouter.com/) integration with server-side-rendering.\n1. [Internationalization (I18n) and (localization)](https://www.shakacode.com/react-on-rails/docs/guides/i18n)\n1. A supportive community. This [web search shows how live public sites are using React on Rails](https://publicwww.com/websites/%22react-on-rails%22++-undeveloped.com+depth%3Aall/).\n1. [ReScript Support](https://github.com/shakacode/rescript-react-on-rails-example).\n\nSee [Rails/Webpacker React Integration Options](https://www.shakacode.com/react-on-rails/docs/guides/rails-webpacker-react-integration-options) for comparisons to other gems.\n\n## Online demo\n\n- See the [react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial) for an example of a live implementation and code.\n- A deployed version of the project `spec/dummy`, which demonstrates several uses of `react_on_rails`, will soon be available on [Control Plane through this link](https://ror-spec-dummy.reactrails.com/)\n\n## ShakaCode Forum Premium Content\n\n_Requires creating a free account._\n\n- [How to use different versions of a file for client and server rendering](https://forum.shakacode.com/t/how-to-use-different-versions-of-a-file-for-client-and-server-rendering/1352)\n- [How to conditionally render server side based on the device type](https://forum.shakacode.com/t/how-to-conditionally-render-server-side-based-on-the-device-type/1473)\n\n## Prerequisites\n\nRuby on Rails \u003e=5, rails/webpacker \u003e= 4.2 or shakapacker \u003e 6, Ruby \u003e= 3.0.0\n\n# Support\n\n- [Click to join **React + Rails Slack**](https://reactrails.slack.com/join/shared_invite/enQtNjY3NTczMjczNzYxLTlmYjdiZmY3MTVlMzU2YWE0OWM0MzNiZDI0MzdkZGFiZTFkYTFkOGVjODBmOWEyYWQ3MzA2NGE1YWJjNmVlMGE).\n\n- [**Subscribe**](https://app.mailerlite.com/webforms/landing/l1d9x5) for announcements of new releases of React on Rails and of our latest [blog articles](https://blog.shakacode.com) and tutorials.\n- [Discussions](https://github.com/shakacode/react_on_rails/discussions): Post your questions regarding React on Rails\n- **[forum.shakacode.com](https://forum.shakacode.com)**: Other discussions\n- **[@railsonmaui on Twitter](https://twitter.com/railsonmaui)**\n- _See [NEWS.md](https://github.com/shakacode/react_on_rails/tree/master/NEWS.md) for more notes over time._\n- See [Projects](https://github.com/shakacode/react_on_rails/tree/master/PROJECTS.md) using and [KUDOS](https://github.com/shakacode/react_on_rails/tree/master/KUDOS.md) for React on Rails. Please submit yours! Please edit either page or [email us](mailto:contact@shakacode.com) and we'll add your info. We also **love stars** as it helps us attract new users and contributors.\n\n## Contributing\n\nBug reports and pull requests are welcome. To get started, see [Contributing](https://github.com/shakacode/react_on_rails/tree/master/CONTRIBUTING.md) and the [list of help wanted issues](https://github.com/shakacode/react_on_rails/labels/contributions%3A%20up%20for%20grabs%21).\n\n# Work with Us\n\nShakaCode is **[hiring passionate software engineers](http://www.shakacode.com/career)** to work on our projects, including [HiChee](https://hichee.com)!\n\n# License\n\nThe gem is available as open source under the terms of the [MIT License](https://github.com/shakacode/react_on_rails/tree/master/LICENSE.md).\n\n# Supporters\n\nThe following companies support our open-source projects, and ShakaCode uses their products!\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n\u003ca href=\"https://www.jetbrains.com\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/4244251/184881139-42e4076b-024b-4b30-8c60-c3cd0e758c0a.png\" alt=\"JetBrains\" height=\"120px\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://scoutapp.com\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://user-images.githubusercontent.com/4244251/184881147-0d077438-3978-40da-ace9-4f650d2efe2e.png\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://user-images.githubusercontent.com/4244251/184881152-9f2d8fba-88ac-4ba6-873b-22387f8711c5.png\"\u003e\n    \u003cimg alt=\"ScoutAPM\" src=\"https://user-images.githubusercontent.com/4244251/184881152-9f2d8fba-88ac-4ba6-873b-22387f8711c5.png\" height=\"120px\"\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\u003ca href=\"https://shakacode.controlplane.com\"\u003e\n  \u003cpicture\u003e\n    \u003cimg alt=\"Control Plane\" src=\"https://github.com/shakacode/.github/assets/20628911/90babd87-62c4-4de3-baa4-3d78ef4bec25\" height=\"120px\"\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\u003cbr /\u003e\n\u003ca href=\"https://www.browserstack.com\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://user-images.githubusercontent.com/4244251/184881122-407dcc29-df78-4b20-a9ad-f597b56f6cdb.png\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://user-images.githubusercontent.com/4244251/184881129-e1edf4b7-3ae1-4ea8-9e6d-3595cf01609e.png\"\u003e\n    \u003cimg alt=\"BrowserStack\" src=\"https://user-images.githubusercontent.com/4244251/184881129-e1edf4b7-3ae1-4ea8-9e6d-3595cf01609e.png\" height=\"55px\"\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\u003ca href=\"https://railsautoscale.com\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/4244251/184881144-95c2c25c-9879-4069-864d-4e67d6ed39d2.png\" alt=\"Rails Autoscale\" height=\"55px\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://www.honeybadger.io\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/4244251/184881133-79ee9c3c-8165-4852-958e-31687b9536f4.png\" alt=\"Honeybadger\" height=\"55px\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://reviewable.io\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/20628911/230848305-c94510a4-82d7-468f-bf9f-eeb81d3f2ce0.png\" alt=\"Reviewable\" height=\"55px\"\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakacode%2Freact_on_rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshakacode%2Freact_on_rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakacode%2Freact_on_rails/lists"}