Guides
Rails
Javascript
Additional details
Deployment
React on rails pro
Api
Misc
Contributor info
Testimonials
Outdated
Shakacode logoShakaCodeDeveloped by

Copyright 2020 ShakaCode

React on Rails

React on Rails integrates Rails with (server rendering of) Facebook's React front-end framework.


Project Objective

To provide a high performance framework for integrating Ruby on Rails with React via the Shakapacker gem especially in regards to React Server-Side Rendering for better SEO and improved performance.

Features and Why React on Rails?

  1. 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.
  2. Tight integration with shakacode/shakapacker.
  3. Server-Side Rendering (SSR), often used for SEO crawler indexing and UX performance, is not offered by shakacode/shakapacker.
  4. Support for HMR for a great developer experience.
  5. Supports latest versions of React with hooks.
  6. Redux and React Router integration including server-side-rendering.
  7. Internationalization (I18n) and (localization)
  8. A supportive community. This web search shows how live public sites are using React on Rails.
  9. ReScript (Reason ML) Support.

See the react-webpack-rails-tutorial for an example of a live implementation and code.


Prerequisites

  • Ruby on Rails >=5
  • Shakapacker 6.5.1+.