-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
34 lines (26 loc) · 886 Bytes
/
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
import React from 'react';
import {SafeAreaView} from 'react-native';
import ReduxThunk from 'redux-thunk';
import {createStore,combineReducers, applyMiddleware} from 'redux';
import {Provider} from 'react-redux';
import fillReducer from './store/reducers/fillReducer';
import fileReducer from './store/reducers/fileReducer';
import dbRedcuer from './store/reducers/dbRedcuer';
import * as dbFunctions from './database/connection';
import MainNavigator from './navigation/MainNavigator';
const rootReducer = combineReducers({
fill: fillReducer,
file: fileReducer,
db: dbRedcuer
})
const store = createStore(rootReducer, applyMiddleware(ReduxThunk));
dbFunctions.init();
export default function App() {
return (
<Provider store={store}>
<SafeAreaView style={{flex:1}}>
<MainNavigator/>
</SafeAreaView>
</Provider>
);
}