Skip to content

Commit 0e7d0af

Browse files
committed
lesson 08 deveoping
1 parent 2f32f0f commit 0e7d0af

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

lessons/01-setting-up/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
import React from 'react'
22
import { render } from 'react-dom'
33
import App from './modules/App'
4-
import { Router, Route, hashHistory} from 'react-router';
4+
import { Router, Route, hashHistory, IndexRoute} from 'react-router';
55

66
import About from './modules/About';
77
import Repos from './modules/Repos';
88

99
import Repo from './modules/Repo'
1010

11+
import Home from './modules/Home'
12+
1113
render((
1214
<Router history={hashHistory}>
1315
<Route path="/" component={App}>
16+
17+
{/* add it here, as a child of '/' */}
18+
{/*<IndexRoute component={Home}/>*/}
19+
1420
<Route path="/repos" component={Repos}>
1521
{/* add this new route*/}
1622
<Route path="/repos/:userName/:repoName" component={Repo}/>

lessons/01-setting-up/modules/Home.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React, {Component} from 'react';
2+
3+
class Home extends Component {
4+
render() {
5+
return <div>Home</div>
6+
}
7+
}
8+
9+
export default Home;

npm-debug.log

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
0 info it worked if it ends with ok
2+
1 verbose cli [ '/Users/r2fresh/.nvm/versions/v4.5.0/bin/node',
3+
1 verbose cli '/Users/r2fresh/.nvm/versions/v4.5.0/bin/npm',
4+
1 verbose cli 'start' ]
5+
2 info using [email protected]
6+
3 info using [email protected]
7+
4 verbose stack Error: ENOENT: no such file or directory, open '/Users/r2fresh/workspace/react-router-tutorial/package.json'
8+
4 verbose stack at Error (native)
9+
5 verbose cwd /Users/r2fresh/workspace/react-router-tutorial
10+
6 error Darwin 15.6.0
11+
7 error argv "/Users/r2fresh/.nvm/versions/v4.5.0/bin/node" "/Users/r2fresh/.nvm/versions/v4.5.0/bin/npm" "start"
12+
8 error node v4.5.0
13+
9 error npm v2.15.9
14+
10 error path /Users/r2fresh/workspace/react-router-tutorial/package.json
15+
11 error code ENOENT
16+
12 error errno -2
17+
13 error syscall open
18+
14 error enoent ENOENT: no such file or directory, open '/Users/r2fresh/workspace/react-router-tutorial/package.json'
19+
14 error enoent This is most likely not a problem with npm itself
20+
14 error enoent and is related to npm not being able to find a file.
21+
15 verbose exit [ -2, true ]

0 commit comments

Comments
 (0)