Skip to content

Instantly share code, notes, and snippets.

@oleg-voloshyn
Last active March 3, 2016 13:02
Show Gist options
  • Select an option

  • Save oleg-voloshyn/4a27e5fedd07446f53e5 to your computer and use it in GitHub Desktop.

Select an option

Save oleg-voloshyn/4a27e5fedd07446f53e5 to your computer and use it in GitHub Desktop.
install React, Lodash and Flux
  1. add gem 'react-rails', '~> 1.6.0' to Gemfile Github link
  2. bundle install
  3. rails g react:install
  4. rename directory from ../app/assets/javascripts/components to ../app/assets/javascripts/react
  5. change line from //= require_tree ./components to //= require_tree ./react
  6. add Lo-Dash to vendor/assets/javascripts directory
    • add //= require lodash line to components.js files
  7. add Alt (Github link), Alt (Flux)
    • add //= require alt line to components.js
    • create app/assests/javascript/initialize.js file and add next line window.alt = new Alt()
    • add //= require initialize line to components.js
  8. create react/actions and react/stores directories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment