File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ export const Linking = {
6
6
getInitialURL : ( ) => Promise . reject ( 'Unsupported platform' ) ,
7
7
} ;
8
8
9
- export const BackAndroid = {
9
+ export const BackHandler = {
10
10
addEventListener : ( ) => { } ,
11
11
} ;
Original file line number Diff line number Diff line change 2
2
3
3
import {
4
4
BackAndroid as DeprecatedBackAndroid ,
5
- BackHandler ,
5
+ BackHandler as ModernBackHandler ,
6
6
Linking ,
7
7
} from 'react-native' ;
8
8
9
- const BackAndroid = BackHandler || DeprecatedBackAndroid ;
9
+ const BackHandler = ModernBackHandler || DeprecatedBackAndroid ;
10
10
11
- export { BackAndroid , Linking } ;
11
+ export { BackHandler , Linking } ;
Original file line number Diff line number Diff line change 2
2
3
3
import React from 'react' ;
4
4
import invariant from './utils/invariant' ;
5
- import { BackAndroid , Linking } from './PlatformHelpers' ;
5
+ import { BackHandler , Linking } from './PlatformHelpers' ;
6
6
import NavigationActions from './NavigationActions' ;
7
7
import addNavigationHelpers from './addNavigationHelpers' ;
8
8
@@ -154,7 +154,7 @@ export default function createNavigationContainer<T: *>(
154
154
return ;
155
155
}
156
156
157
- this . subs = BackAndroid . addEventListener ( 'backPress ' , ( ) =>
157
+ this . subs = BackHandler . addEventListener ( 'hardwareBackPress ' , ( ) =>
158
158
this . dispatch ( NavigationActions . back ( ) )
159
159
) ;
160
160
You can’t perform that action at this time.
0 commit comments