-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
27 lines (25 loc) · 860 Bytes
/
App.js
File metadata and controls
27 lines (25 loc) · 860 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
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import SplashScreen from './src/SplashScreen';
import Store from './src/Store';
import { Observer } from 'mobx-react';
import HomeScreen from './src/HomeScreen';
export default App = () => {
const StackNavigator = createStackNavigator();
return (
<NavigationContainer>
<Observer>
{
() => (
<StackNavigator.Navigator>
{Store.screen == 0 ?
<StackNavigator.Screen component={SplashScreen} name="Splash" options={{ headerShown: false }} /> :
<StackNavigator.Screen component={HomeScreen} name="Home" />}
</StackNavigator.Navigator>
)
}
</Observer>
</NavigationContainer>
);
}