Skip to content

Commit cf91d75

Browse files
zhigang1992necolas
authored andcommitted
[add] LogBox stub
Close #1794
1 parent 6624a70 commit cf91d75

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

packages/babel-plugin-react-native-web/src/moduleMap.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module.exports = {
2626
KeyboardAvoidingView: true,
2727
LayoutAnimation: true,
2828
Linking: true,
29+
LogBox: true,
2930
Modal: true,
3031
NativeEventEmitter: true,
3132
NativeModules: true,
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Copyright (c) 2016-present, Nicolas Gallagher.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @flow
8+
*/
9+
10+
const LogBox = {
11+
ignoreLogs() {},
12+
ignoreAllLogs() {},
13+
uninstall() {},
14+
install() {}
15+
};
16+
17+
export default LogBox;

packages/react-native-web/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export { default as TouchableWithoutFeedback } from './exports/TouchableWithoutF
5959
export { default as View } from './exports/View';
6060
export { default as VirtualizedList } from './exports/VirtualizedList';
6161
export { default as YellowBox } from './exports/YellowBox';
62+
export { default as LogBox } from './exports/LogBox';
6263

6364
// compat (components)
6465
export { default as DrawerLayoutAndroid } from './exports/DrawerLayoutAndroid';

0 commit comments

Comments
 (0)