Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@

# Ignore Byebug command history file.
.byebug_history
# React on Rails
npm-debug.log*
node_modules

# Generated js bundles
/app/assets/webpack/*

.DS_Store
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'react-rails'

gem 'haml'

gem 'react_on_rails', '~>6'

gem 'mini_racer', platforms: :ruby
25 changes: 14 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ GEM
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
arel (7.1.4)
babel-source (5.8.35)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
builder (3.2.3)
byebug (9.0.6)
coffee-rails (4.2.1)
Expand Down Expand Up @@ -70,6 +68,7 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
libv8 (5.3.332.38.3)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
Expand All @@ -82,12 +81,15 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
mini_racer (0.1.7)
libv8 (~> 5.3)
minitest (5.10.1)
multi_json (1.12.1)
nio4r (1.2.1)
nokogiri (1.7.0.1)
mini_portile2 (~> 2.1.0)
pg (0.18.4)
public_suffix (2.0.5)
puma (3.6.2)
rack (2.0.1)
rack-test (0.6.3)
Expand Down Expand Up @@ -115,17 +117,17 @@ GEM
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (2.2.1)
rake (12.0.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
react-rails (1.10.0)
babel-transpiler (>= 0.7.0)
coffee-script-source (~> 1.8)
react_on_rails (6.4.2)
addressable
connection_pool
execjs
railties (>= 3.2)
tilt
execjs (~> 2.5)
rails (>= 3.2)
rainbow (~> 2.1)
sass (3.4.23)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
Expand Down Expand Up @@ -175,10 +177,11 @@ DEPENDENCIES
jbuilder (~> 2.5)
jquery-rails
listen (~> 3.0.5)
mini_racer
pg
puma (~> 3.0)
rails (~> 5.0.1)
react-rails
react_on_rails (~> 6)
sass-rails (~> 5.0)
spring
spring-watcher-listen (~> 2.0.0)
Expand Down
2 changes: 2 additions & 0 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
web: rails s -p 3000
client: sh -c 'rm app/assets/webpack/* || true && cd client && npm run build:development'
42 changes: 2 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,9 @@
# calreact

This is a simple calendar appointments app built as part of the [The Free React on Rails Course](https://learnetto.com/users/hrishio/courses/the-free-react-on-rails-course) on [Learnetto](https://learnetto.com).
This is a simple calendar appointments app built as part of the [The Complete React on Rails Course](https://learnetto.com/users/hrishio/courses/the-complete-react-on-rails-5-course) on [Learnetto](https://learnetto.com).

It's a Ruby on Rails 5 app which uses React.js on the frontend.

Demo app - [https://calreact.herokuapp.com/](https://calreact.herokuapp.com/)

The code for each lesson in the course is tagged by module and lesson number in this repo. For example, lesson 2 under Module 3 is tagged lesson-3.2.

## Lessons list and links to code:

1. Introduction to React

1.1. Quick Introduction to key React concepts

2. Getting started with React in Rails

2.1. [Installation and setup of Rails 5 app with react-rails gem](https://github.com/learnetto/calreact/tree/lesson-2.1)

3. Your first Rails app with React

3.1. [Calendar appointments app with jQuery and Haml](https://github.com/learnetto/calreact/tree/lesson-3.1)

3.2. [React props and nested components](https://github.com/learnetto/calreact/tree/lesson-3.2)

3.3. [React State - Handling user form input](https://github.com/learnetto/calreact/tree/lesson-3.3)

3.4. [React State - Handling form submission](https://github.com/learnetto/calreact/tree/lesson-3.4)

3.5. [Using a third-party JavaScript library - Moment.js](https://github.com/learnetto/calreact/tree/lesson-3.5)

3.6. [Using a third-party React component - react-datetime](https://github.com/learnetto/calreact/tree/lesson-3.6)

3.7. [Styling with CSS in React](https://github.com/learnetto/calreact/tree/lesson-3.7)

3.8. [Deploying a react-rails app to Heroku](https://github.com/learnetto/calreact/tree/lesson-3.8)

4. ECMAScript 6 (ES6)

4.1. [Introduction to ES6 using the react-rails component generator](https://github.com/learnetto/calreact/tree/lesson-4.1-4.3)

4.2. [ES6 classes in React](https://github.com/learnetto/calreact/tree/lesson-4.1-4.3)

4.3. [ES6 Arrow functions in React](https://github.com/learnetto/calreact/tree/lesson-4.1-4.3)

4.4. [Stateless Functional Components in React](https://github.com/learnetto/calreact/tree/lesson-4.4)
This branch has the code for Module 5 Lesson 2 - Migrating the Calendar appointments app to react_on_rails.
7 changes: 2 additions & 5 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//= require webpack-bundle

// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
Expand All @@ -13,9 +15,4 @@
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require react
//= require react_ujs
//= require moment
//= require react-datetime.min
//= require components
//= require_tree .
3 changes: 0 additions & 3 deletions app/assets/javascripts/appointments.coffee

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/javascripts/components.js

This file was deleted.

Empty file.
Loading