-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
35 lines (31 loc) · 1.01 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
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import Appnavigator from './src/navigations/AppNavigator';
import { PersistGate } from 'redux-persist/integration/react';
import { store, persistor } from './src/store/store';
import SplashScreen from 'react-native-splash-screen';
export default class App extends Component {
state = {
theme: 'light'
}
componentDidMount() {
SplashScreen.hide()
}
dark = () => this.setState({ theme: 'dark'});
light = () => this.setState({ theme: 'light'});
render() {
return (
<Provider store={store}>
<PersistGate persistor={persistor}>
<Appnavigator
screenProps={{
theme: this.state.theme,
dark: this.dark,
light: this.light
}}
/>
</PersistGate>
</Provider>
);
}
}