Skip to content

Commit 944cbdd

Browse files
committed
Update HashHistory.md
declaring the history outside of the render function
1 parent 6bd8dae commit 944cbdd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/03 History/HashHistory.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ Normal usage
3434
```js
3535
import { Router } from 'react-router';
3636
import HashHistory from 'react-router/lib/HashHistory';
37+
var history = new HashHistory();
3738

3839
React.render((
39-
<Router history={new HashHistory}>
40+
<Router history={ history }>
4041
{/* ... */}
4142
</Router>
4243
), document.body);

0 commit comments

Comments
 (0)