-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
31 lines (26 loc) · 943 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
29
30
31
import * as React from 'react';
import { AppRegistry, StatusBar, useColorScheme } from 'react-native';
import { PaperProvider } from 'react-native-paper';
import { Provider as ReduxProvider } from 'react-redux';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import App from './src/App';
import createStore, { runSagas } from './src/state/configureStore';
import sagas from './src/sagas';
import { name as appName } from './app.json';
import('./ReactotronConfig');
const store = createStore();
runSagas(sagas);
export default function Main() {
const isDarkMode = useColorScheme() === 'dark';
return (
<ReduxProvider store={store}>
<SafeAreaProvider>
<PaperProvider>
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
<App />
</PaperProvider>
</SafeAreaProvider>
</ReduxProvider>
);
}
AppRegistry.registerComponent(appName, () => Main);