Skip to content

alex-borodin-vtlabs/create-react-app-rails

Repository files navigation

Create React App on Rails

Just clone and use routing, admin interface, API requests and others.

Technologies

See package.json and Gemfile for versions

  1. Ruby on Rails 5
  2. Create React App
  3. Devise
  4. ActiveAdmin
  5. React
  6. Redux
  7. react-router v4
  8. Semantic UI React
  9. esLint

Installation

  1. Be sure that you have Node installed! We suggest nvm, with node version v6.0 or above.
  2. git clone https://github.com/vacuumtubedriver/create-react-app-rails.git
  3. cd create-react-app-rails
  4. gem install foreman
  5. bundle install
  6. brew install yarn
  7. cd client
  8. yarn
  9. cd ..
  10. rake db:migrate
  11. rake db:seed
  12. rake start

How To

  • Router: just add new route in client/app/bundles/MainApp/routes/routes.jsx

  • API

    • in component:
      this.props.actions.callApi(url, method, storeKey);
    
    • access response:
     store.appReducers.get(storeKey)
    
    • urls /api/v0/
  • Linting:

      cd client
      yarn lint
    

Contributors

VT Labs