Skip to content

Commit 2147a32

Browse files
kesha-antonovaksonov
authored andcommitted
fix rn 0.43 comp (#1819)
1 parent 6c52665 commit 2147a32

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Router.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import React, {
1010
Component,
1111
PropTypes,
1212
} from 'react';
13-
import { BackAndroid } from 'react-native';
13+
import { BackHandler } from 'react-native';
1414
import NavigationExperimental from 'react-native-experimental-navigation';
1515

1616
import Actions, { ActionMap } from './Actions';
@@ -52,7 +52,7 @@ class Router extends Component {
5252
}
5353

5454
componentDidMount() {
55-
BackAndroid.addEventListener('hardwareBackPress', this.handleBackAndroid);
55+
BackHandler.addEventListener('hardwareBackPress', this.handleBackAndroid);
5656
}
5757

5858
componentWillReceiveProps(props) {
@@ -61,7 +61,7 @@ class Router extends Component {
6161
}
6262

6363
componentWillUnmount() {
64-
BackAndroid.removeEventListener('hardwareBackPress', this.handleBackAndroid);
64+
BackHandler.removeEventListener('hardwareBackPress', this.handleBackAndroid);
6565
}
6666

6767
handleBackAndroid() {

0 commit comments

Comments
 (0)