forked from CodeRabbitYu/ShiTu
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
42 lines (30 loc) · 876 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { AppRegistry, YellowBox, Text, TextInput } from 'react-native';
import { configure } from 'mobx';
configure({ enforceActions: true });
import { Theme } from 'teaset';
import './app/utils';
import DefaultTheme from './app/resource/thems/DefaultTheme';
import {addCustomProps} from './app/utils';
// 处理iOS系统文字
addCustomProps(Text, {allowFontScaling: false});
addCustomProps(TextInput, {allowFontScaling: false});
Theme.set(DefaultTheme);
import App from './app/index';
if (!__DEV__) {
global.console = {
info: () => {
},
log: () => {
},
warn: () => {
},
error: () => {
},
};
}
// YellowBox.ignoreWarnings(['Warning: isMounted(...)']);
// 关闭指定警告
console.ignoredYellowBox = [ 'Warning: isMounted(...)', ];
// 关闭全部的警告
// console.disableYellowBox = true;
AppRegistry.registerComponent('ShiTu', () => App);