Skip to content

Commit 6bd8dae

Browse files
committed
Update BrowserHistory.md
`new BrowserHistory()` shouldn't be inside the props decleration but outside the render method.
1 parent 0b78745 commit 6bd8dae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/03 History/BrowserHistory.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ Example
4444
```js
4545
import { Router } from 'react-router';
4646
import BrowserHistory from 'react-router/lib/BrowserHistory';
47+
var history = new BrowserHistory();
4748

4849
React.render((
49-
<Router history={new BrowserHistory}>
50+
<Router history={ history }>
5051
{/* ... */}
5152
</Router>
5253
), document.body);

0 commit comments

Comments
 (0)