Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit ef33164

Browse files
author
soliury
committed
reuse router
1 parent de75ff7 commit ef33164

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/containers/Navitation.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ class Navitation extends Component {
3232

3333

3434
renderScene(route, navigator) {
35+
this.router = this.router || new Router(navigator)
3536
if (route.component) {
3637
return React.createElement(route.component, Object.assign({}, route.props,
3738
{
3839
ref: view=>this[route.name] = view,
3940
actions: this.props.actions,
4041
state: this.props.state,
41-
router: new Router(navigator)
42+
router: this.router
4243
}
4344
))
4445
}

0 commit comments

Comments
 (0)