File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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' ;
1414import NavigationExperimental from 'react-native-experimental-navigation' ;
1515
1616import 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 ( ) {
You can’t perform that action at this time.
0 commit comments