File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
3
import {
4
- BackAndroid ,
4
+ BackHandler ,
5
5
Platform ,
6
6
StyleSheet ,
7
7
Text ,
@@ -68,7 +68,7 @@ class NavBarContainer extends React.Component {
68
68
69
69
componentDidMount ( ) {
70
70
if ( Platform . OS === 'android' && ! ! this . props . handleBackAndroid ) {
71
- BackAndroid . addEventListener ( 'hardwareBackPress' , ( ) => {
71
+ BackHandler . addEventListener ( 'hardwareBackPress' , ( ) => {
72
72
if ( this . props . currentRoute . index > 0 ) {
73
73
this . goBack ( ) ;
74
74
return true ;
@@ -89,7 +89,7 @@ class NavBarContainer extends React.Component {
89
89
90
90
componentWillUnmount ( ) {
91
91
if ( Platform . OS === 'android' && ! ! this . props . handleBackAndroid ) {
92
- BackAndroid . removeEventListener ( 'hardwareBackPress' ) ;
92
+ BackHandler . removeEventListener ( 'hardwareBackPress' ) ;
93
93
}
94
94
}
95
95
You can’t perform that action at this time.
0 commit comments