File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed
babel-plugin-react-native-web/src Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ module.exports = {
7
7
AppRegistry : true ,
8
8
AppState : true ,
9
9
Appearance : true ,
10
+ BackHandler : true ,
10
11
Button : true ,
11
12
CheckBox : true ,
12
13
Clipboard : true ,
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright (c) Nicolas Gallagher.
3
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ *
8
+ * @flow
9
+ */
10
+
11
+ function emptyFunction ( ) { }
12
+
13
+ const BackHandler = {
14
+ exitApp : emptyFunction ,
15
+ addEventListener ( ) : { | remove : ( ) => void | } {
16
+ console . error (
17
+ 'BackHandler is not supported on web and should not be used.'
18
+ ) ;
19
+ return {
20
+ remove : emptyFunction
21
+ } ;
22
+ } ,
23
+ removeEventListener : emptyFunction
24
+ } ;
25
+
26
+ export default BackHandler ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ export { default as Animated } from './exports/Animated';
13
13
export { default as Appearance } from './exports/Appearance' ;
14
14
export { default as AppRegistry } from './exports/AppRegistry' ;
15
15
export { default as AppState } from './exports/AppState' ;
16
+ export { default as BackHandler } from './exports/BackHandler' ;
16
17
export { default as Clipboard } from './exports/Clipboard' ;
17
18
export { default as Dimensions } from './exports/Dimensions' ;
18
19
export { default as Easing } from './exports/Easing' ;
You can’t perform that action at this time.
0 commit comments