Skip to content

Commit db70b64

Browse files
committed
Fix willfocus on first route
1 parent 916aae9 commit db70b64

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ class Router extends React.Component {
7373
this.emitter = new EventEmitter();
7474
}
7575

76+
componentWillMount() {
77+
this.state.route = this.props.firstRoute;
78+
}
79+
7680
componentDidMount() {
7781
this.refs.navigator.navigationContext.addListener('willfocus', (event) => {
7882
const route = event.data.route;

0 commit comments

Comments
 (0)