Tutorial by Examples

Add react-rails to your Gemfile: gem 'react-rails' And install: bundle install Next, run the installation script: rails g react:install This will: create a components.js manifest file and a app/assets/javascripts/components/ directory, where you will put your components place the follo...
React.js builds You can pick which React.js build (development, production, with or without add-ons) to serve in each environment by adding a config. Here are the defaults: # config/environments/development.rb MyApp::Application.configure do config.react.variant = :development end # conf...
react-rails includes a view helper (react_component) and an unobtrusive JavaScript driver (react_ujs) which work together to put React components on the page. You should require the UJS driver in your manifest after react (and after turbolinks if you use Turbolinks). The view helper puts a div on t...

Page 1 of 1