Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Commit 4bd1969

Browse files
committed
Merge branch 'andrewcoelho-master'
2 parents 2fc7ca6 + 2f18796 commit 4bd1969

File tree

146 files changed

+1524
-44
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+1524
-44
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ React Router Tutorial
33

44
Quick lessons for getting up-to-speed with React Router.
55

6-
See [01-setting-up.md](/lessons/01-setting-up.md) to get started.
6+
See [Lesson 1 - Setting Up](/lessons/01-setting-up/) to get started.
77

8-
Each lesson has a commit for the final code so you can `git checkout
9-
<previous lesson final sha>` before starting a new one if you'd like.
8+
Each lesson is a fully runnable app with all code from the previous lesson, so you can `cd lessons/<lesson-folder>`, npm install,
9+
and then run the appropriate NPM scripts for each lesson from within the lesson folder.
1010

1111
Missing stuff that will come eventually, hopefully ... maybe.
1212

@@ -15,4 +15,3 @@ Missing stuff that will come eventually, hopefully ... maybe.
1515
- code splitting
1616
- location state
1717
- data integration
18-

lessons/01-setting-up.md renamed to lessons/01-setting-up/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ up our project.
1111
```
1212
git clone <tutorial url>
1313
cd react-router-tutorial
14-
git checkout start
14+
cd lessons/01-setting-up
1515
npm install
1616
npm start
1717
```
@@ -30,5 +30,4 @@ Open up `modules/App.js` and change the text to something like "Hello
3030

3131
---
3232

33-
[Next: Rendering a Router](02-rendering-a-router.md)
34-
33+
[Next: Rendering a Router](../02-rendering-a-route/)

lessons/01-setting-up/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!doctype html public "storage">
2+
<html>
3+
<meta charset=utf-8/>
4+
<title>My First React Router App</title>
5+
<div id=app></div>
6+
<script src="bundle.js"></script>

lessons/01-setting-up/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import React from 'react'
2+
import { render } from 'react-dom'
3+
import App from './modules/App'
4+
render(<App/>, document.getElementById('app'))
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react'
2+
3+
export default React.createClass({
4+
render() {
5+
return <div>Hello, React Router!</div>
6+
}
7+
})

lessons/01-setting-up/package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "tutorial",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"start": "webpack-dev-server --inline --content-base ."
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"dependencies": {
12+
"react": "^0.14.7",
13+
"react-dom": "^0.14.7",
14+
"react-router": "^2.0.0"
15+
},
16+
"devDependencies": {
17+
"babel-core": "^6.5.1",
18+
"babel-loader": "^6.2.2",
19+
"babel-preset-es2015": "^6.5.0",
20+
"babel-preset-react": "^6.5.0",
21+
"http-server": "^0.8.5",
22+
"webpack": "^1.12.13",
23+
"webpack-dev-server": "^1.14.1"
24+
}
25+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
entry: './index.js',
3+
4+
output: {
5+
filename: 'bundle.js',
6+
publicPath: ''
7+
},
8+
9+
module: {
10+
loaders: [
11+
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' }
12+
]
13+
}
14+
}

lessons/02-rendering-a-router.md renamed to lessons/02-rendering-a-route/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,4 @@ http://localhost:8080/#/repos
8484

8585
---
8686

87-
[Next: Navigating With Link](03-navigating-with-link.md)
88-
87+
[Next: Navigating With Link](../03-navigating-with-link/)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!doctype html public "storage">
2+
<html>
3+
<meta charset=utf-8/>
4+
<title>My First React Router App</title>
5+
<div id=app></div>
6+
<script src="bundle.js"></script>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import React from 'react'
2+
import { render } from 'react-dom'
3+
import App from './modules/App'
4+
render(<App/>, document.getElementById('app'))

0 commit comments

Comments
 (0)