HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
reactjs
react-rails
JavaScript2014–2025
reactjs / react-rails

react-rails

Integrate React.js with Rails views and controllers, the asset pipeline, or webpacker.

16Distinct people
17Mentions
0Explicit recommenders
6.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Integrate React.js with Rails views and controllers, the asset pipeline, or webpacker.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year17 dated mentions

Observed mentions: 2014-10-16 14:44:35 UTC to 2025-02-05 09:18:14 UTC.

0123452014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC202
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC312
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC505
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC211
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

What Hacker News says

5 sources
Yes, you certainly can. This is actually a topic that I've been exploring for a little while now. http://www.openmindedinnovations.com/blogs/3-ways-to-integra... is a decent, although old article on the three different ways that it can be done. I personally recommend https://github.com/shakacode/react_on_rails as the solution to this issue. Instead of merely providing you with React and React only like https://github.com/reactjs/react-rails does, it welds Node & Rails together to enable you to use the latest and greatest of the javascript ecosystem. As for the benefits of doing so, having started my web development journey with Rails, I like to think that Rails provides an excellent convention for Backend MVC & ORM while Node gives you access to up-to-date javascript libraries & frameworks. Combining Node & Rails allows to you to exploit
Read the rest
the strengths of both systems in exchange for dealing with greater complexity.
In Ask HN: Someone here to team up with me on a project to learn React together?
I was in quite the same situation, Angular 1.x was quite hard to grok at first. But React just "clicked" instantly. For integration with Rails, I found https://github.com/reactjs/react-rails to be quite useful. It integrates the Babel transformer for JSX into the asset pipeline and brings a couple of helper functions, so no additional setup needed. You start writing your components, "mount" them via the helpers in standard .erb templates (or even without the template directly from a controller action), done.
In React Implementation Notes
"Once you start doing your UI with it, you pretty much need to make the entire thing use react to really benefit from its model." In my experience React is quite ideal for cases where some parts of a site or an app need dynamic behavior. I'm currently working on an e-commerce platform's admin panel, and for us a complete rewrite would have been nearly impossible. With React we can keep the old HTML + jQuery codebase, and implement/refactor stuff as small or as big as we need (e.g. a live-search component or a whole new dashboard view). We're doing something very similar to this: https://github.com/reactjs/react-rails#rendering--mounting
In React is mostly hype
React Rails[1] works fine: you just get React, and it's difficult to integrate other shiny React-associated stuff like Redux, but it makes it incredibly easy to build out an app, or even just sprinkle components throughout an existing Rails app. It's dead simple to get started, and I've found it generally Just Works; the whole team I work on has been using it for the last 4-5 months without any issues. Just add to Gemfile -> it sets up a components folder + a file that imports the file tree -> then optionally set initializer options (like include React Addons, or use stage-0 stuff). All exposed globals though, which is a pain, but that's generally expected with the asset pipeline unless you're very disciplined. There's a pretty complete tutorial, but it's a bit out of date + uses CoffeeScript rather than JSX - I made a copy of the origina
Read the rest
l, with updates, for one of my colleagues, the gist is here (sorry, might be a little rough): https://gist.github.com/DanCouper/b6953544a34606617eb5 To get a bit deeper, there's React on Rails[2], which retains the same entry point, but moves all the JS to a separate folder at root, and uses Node to handle that side of things during development. The setup is batteries included, and pretty flexible, but I haven't used it a huge amount so can't give much detailed feedback. 1. https://github.com/reactjs/react-rails 2. https://github.com/shakacode/react_on_rails
In React-Boilerplate v3: The “JS Fatigue Antivenin” Edition

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.