Skip to content

Commit

Permalink
Update examples to use react-router v4 beta
Browse files Browse the repository at this point in the history
  • Loading branch information
supasate committed Jan 30, 2017
1 parent f7fb98f commit a7a2ecc
Show file tree
Hide file tree
Showing 4 changed files with 556 additions and 588 deletions.
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"react": "^15.4.1",
"react-dom": "^15.4.1",
"react-redux": "^4.4.6",
"react-router": "^4.0.0-alpha.6",
"react-router": "^4.0.0-beta.2",
"redux": "^3.6.0"
}
}
2 changes: 1 addition & 1 deletion examples/src/components/NavBar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { Link } from 'react-router'
import { Link } from 'react-router-dom'

const NavBar = () => (
<div>
Expand Down
12 changes: 7 additions & 5 deletions examples/src/routes/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { Match, Miss } from 'react-router'
import { Route, Switch } from 'react-router'
import Home from '../components/Home'
import Hello from '../components/Hello'
import Counter from '../components/Counter'
Expand All @@ -9,10 +9,12 @@ import NavBar from '../components/NavBar'
const routes = (
<div>
<NavBar />
<Match exactly pattern="/" component={Home} />
<Match pattern="/hello" component={Hello} />
<Match pattern="/counter" component={Counter} />
<Miss component={NoMatch} />
<Switch>
<Route exact path="/" component={Home} />
<Route path="/hello" component={Hello} />
<Route path="/counter" component={Counter} />
<Route component={NoMatch} />
</Switch>
</div>
)

Expand Down
Loading

0 comments on commit a7a2ecc

Please sign in to comment.