Skip to content

Commit 847fef4

Browse files
committed
Updated the docs to use the static getter
1 parent fd87dfb commit 847fef4

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

doc/00 Guides/0 Overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ var App = React.createClass({
141141
// Finally we render a `Router` component with some `Route`s, it'll do all
142142
// the fancy routing stuff for us.
143143
React.render((
144-
<Router history={history()}>
144+
<Router history={history}>
145145
<Route path="/" component={App}>
146146
<Route path="about" component={About}/>
147147
<Route path="inbox" component={Inbox}/>
@@ -162,7 +162,7 @@ var routes = {
162162
]
163163
};
164164

165-
React.render(<Router history={history()} children={routes}/>, document.body);
165+
React.render(<Router history={history} children={routes}/>, document.body);
166166
```
167167

168168
Adding more UI
@@ -191,7 +191,7 @@ var Inbox = React.createClass({
191191
});
192192

193193
React.render((
194-
<Router history={history()}>
194+
<Router history={history}>
195195
<Route component={App}>
196196
<Route path="about" component={About}/>
197197
<Route path="inbox" component={Inbox}>

doc/03 History/0 Histories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ an instance of one with your own options for query parsing.
44

55
```js
66
import { history } from 'react-router/lib/BrowserHistory';
7-
<Router history={history()}/>
7+
<Router history={history}/>
88
```
99

1010
If you need to do your own query parsing:

doc/03 History/BrowserHistory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import { Router } from 'react-router';
4646
import { history } from 'react-router/lib/BrowserHistory';
4747

4848
React.render((
49-
<Router history={ history() }>
49+
<Router history={ history }>
5050
{/* ... */}
5151
</Router>
5252
), document.body);

doc/03 History/HashHistory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import { Router } from 'react-router';
3636
import { history } from 'react-router/lib/HashHistory';
3737

3838
React.render((
39-
<Router history={history()}>
39+
<Router history={history}>
4040
{/* ... */}
4141
</Router>
4242
), document.body);

0 commit comments

Comments
 (0)