-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
49 lines (39 loc) · 1.17 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
import React from 'react';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/lib/integration/react';
import { persistor, store } from './store';
import { createStackNavigator } from 'react-navigation';
import LoadingView from './components/ui/LoadingView';
import TableTimerView from './components/TableTimerView';
import SettingsView from './components/SettingsView';
import { StyleSheet, View } from 'react-native';
import './config/ReactotronConfig.js';
const Stack = createStackNavigator({
Home: { screen: TableTimerView },
Settings: { screen: SettingsView },
});
export default class App extends React.Component {
resetLocalStorage () {
persistor.purge();
}
render() {
// this.resetLocalStorage()
return (
<Provider store={store}>
{/* the loading and persistor props are both required! */}
<PersistGate loading={<LoadingView />} persistor={persistor}>
<View style={styles.container}>
<Stack />
</View>
</PersistGate>
</Provider>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
// marginTop: 24,
backgroundColor: 'grey',
}
});