-
Notifications
You must be signed in to change notification settings - Fork 6
/
App.js
41 lines (23 loc) · 629 Bytes
/
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
import React from 'react';
import { AppRegistry } from 'react-native';
import Splash from './components/Splash';
import Login from './components/Login';
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {
timePassed: false,
};
}
render() {
var mainScreen = <Splash />
setTimeout(() => { this.setState({ timePassed: true }) }, 3000)
if (!this.state.timePassed) {
return mainScreen
} else {
mainScreen = <Login />
}
return mainScreen
}
}
AppRegistry.registerComponent("rn-sample-drawer-app", () => App)