-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.tsx
50 lines (46 loc) · 1.21 KB
/
index.tsx
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
43
44
45
46
47
48
49
50
/**
* @format
* @lint-ignore-every XPLATJSCOPYRIGHT1
*/
import { Provider } from 'mobx-react';
import React, { Component } from 'react';
import { AppRegistry } from 'react-native';
import { createAppContainer, createStackNavigator } from 'react-navigation';
import App from './src/screen/AppScreen';
import MineScreen from './src/screen/MineScreen';
import store from './src/store';
import zhCN from './src/components/LocaleProvider/zh_CN';
import enUS from './src/components/LocaleProvider/en_US';
import LocaleProvider from './src/components/LocaleProvider';
class MainApp extends Component {
fucChange = (WrappedComponent: any) => {
return (
<Provider {...store}>
<LocaleProvider locale={zhCN}>
<WrappedComponent {...this.props} />
</LocaleProvider>
</Provider>
);
};
RNSimple() {
return createAppContainer(
createStackNavigator(
{
App: {
screen: App
},
MineScreen: {
screen: MineScreen
}
},
{
initialRouteName: 'App'
}
)
);
}
render() {
return this.fucChange(this.RNSimple());
}
}
AppRegistry.registerComponent('ideaUI', () => MainApp);