-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
30 lines (27 loc) · 766 Bytes
/
Copy pathApp.js
File metadata and controls
30 lines (27 loc) · 766 Bytes
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
import React from 'react';
import {Provider} from 'mobx-react';
import {Platform, Text} from 'react-native';
import {stores} from './src/stores';
import {Navigator} from './src/navigator';
import SplashScreen from 'react-native-splash-screen';
const App = () => {
React.useEffect(() => {
if (Platform.OS === 'android') {
// override fonts with Roboto
let oldRender = Text.render;
Text.render = function(...args) {
let origin = oldRender.call(this, ...args);
return React.cloneElement(origin, {
style: [{fontFamily: 'Roboto'}, origin.props.style],
});
};
SplashScreen.hide();
}
}, []);
return (
<Provider {...stores}>
<Navigator />
</Provider>
);
};
export default App;