-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
40 lines (35 loc) · 854 Bytes
/
App.js
File metadata and controls
40 lines (35 loc) · 854 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
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React, { Component } from 'react';
import { Text, View } from 'react-native';
import { observer, Provider } from 'mobx-react';
import styled from 'styled-components';
import RootStore from './components/StateManagement/rootStore';
import Login from './components/Login';
import HomeScreen from './components/HomeScreen';
const Container = styled.View`
flex: 1;
background-color: #F5FCFF;
`;
@observer
class App extends Component {
constructor(props) {
super(props);
this.store = new RootStore();
}
render() {
return (
<Provider rootStore={this.store}>
<Container>
{ this.store.authenticated ? <HomeScreen /> : <Login /> }
</Container>
</Provider>
);
}
};
export default App;