-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.js
28 lines (24 loc) · 845 Bytes
/
index.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
/** @format */
import { AppRegistry } from 'react-native';
import App from './App';
import React, { Component } from 'react';
import { name as appName } from './app.json';
import Splash from './components/Splash';
import Navigator from './Navigator';
import { Provider } from 'react-redux';
import store from './store';
class DashboardMain extends Component {
constructor(props) {
super(props);
this.state = { currenttScreen: 'Splash' };
setTimeout(() => {
this.setState({ currenttScreen: 'Navigator' })
}, 3000)
}
render() {
const { currenttScreen } = this.state;
let mainscreen = currenttScreen === 'Splash' ? <Splash /> : <Provider store={store}><Navigator /></Provider>
return mainscreen
}
}
AppRegistry.registerComponent(appName, () => DashboardMain);