-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
58 lines (53 loc) · 1.37 KB
/
App.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { Provider } from 'react-redux';
import { StackNavigator, SwitchNavigator } from 'react-navigation';
import React, { Component } from 'react';
import { View, YellowBox } from 'react-native';
import Store from './src/Store';
import { HomeScreen, CreateTaskScreen, SignInScreen, AuthLoadingScreen } from './src/Screens';
// Ignore warning in the meantime as mentioned in issue: https://github.com/facebook/react-native/issues/18175
YellowBox.ignoreWarnings([
'Warning: componentWillMount is deprecated',
'Warning: componentWillReceiveProps is deprecated',
'Warning: componentWillUpdate is deprecated',
]);
const AuthStack = StackNavigator(
{
SignIn: {
screen: SignInScreen,
title: 'Sign in',
},
}
);
const AppNavigator = StackNavigator(
{
Home: {
screen: HomeScreen,
title: 'Home'
},
CreateTask: {
screen: CreateTaskScreen,
},
},
{
initialRouteName: 'Home'
},
);
const SwitchNav = SwitchNavigator(
{
AuthLoading: AuthLoadingScreen,
App: AppNavigator,
Auth: AuthStack,
},
{
initialRouteName: 'AuthLoading',
}
);
export default class App extends Component {
render() {
return (
<Provider store={Store}>
<SwitchNav/>
</Provider>
);
}
}