-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
33 lines (28 loc) · 832 Bytes
/
App.js
File metadata and controls
33 lines (28 loc) · 832 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
import React from 'react';
import { createStore, combineReducers, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import ReduxThunk from 'redux-thunk';
import { StyleSheet } from 'react-native';
import PlacesNavigation from './navigation/PlacesNavigation';
import placesReducer from './store/places-reducer';
import { init } from './helpers/db';
init()
.then(() => {
console.log('Initialized database!');
})
.catch((err) => {
console.log('Initialization failed!');
console.log(err);
});
const rootReducer = combineReducers({
places: placesReducer,
});
const store = createStore(rootReducer, applyMiddleware(ReduxThunk));
export default function App() {
return (
<Provider store={store}>
<PlacesNavigation />
</Provider>
);
}
const styles = StyleSheet.create({});