Skip to content

Commit

Permalink
update active links example
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanflorence committed Dec 19, 2015
1 parent 3919356 commit 2144df3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
9 changes: 2 additions & 7 deletions examples/active-links/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react'
import { render } from 'react-dom'
import { Router, Route, IndexRoute, Link, IndexLink } from 'react-router'
import { createHistory, useBasename } from 'history'
import { Router, Route, IndexRoute, Link, IndexLink, browserHistory } from 'react-router'

const ACTIVE = { color: 'red' }

Expand Down Expand Up @@ -80,12 +79,8 @@ class About extends React.Component {
}
}

const history = useBasename(createHistory)({
basename: '/active-links'
})

render((
<Router history={history}>
<Router history={browserHistory}>
<Route path="/" component={App}>
<IndexRoute component={Index}/>
<Route path="/about" component={About}/>
Expand Down
1 change: 1 addition & 0 deletions examples/active-links/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!doctype html public "restroom">
<title>Active Links Example</title>
<base href="/active-links"/>
<link href="/global.css" rel="stylesheet"/>
<body>
<h1 class="breadcrumbs"><a href="/">React Router Examples</a> / Active Links</h1>
Expand Down

0 comments on commit 2144df3

Please sign in to comment.