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 = {
77 AppRegistry : true ,
88 AppState : true ,
99 Appearance : true ,
10+ BackHandler : true ,
1011 Button : true ,
1112 CheckBox : true ,
1213 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';
1313export { default as Appearance } from './exports/Appearance' ;
1414export { default as AppRegistry } from './exports/AppRegistry' ;
1515export { default as AppState } from './exports/AppState' ;
16+ export { default as BackHandler } from './exports/BackHandler' ;
1617export { default as Clipboard } from './exports/Clipboard' ;
1718export { default as Dimensions } from './exports/Dimensions' ;
1819export { default as Easing } from './exports/Easing' ;
You can’t perform that action at this time.
0 commit comments