-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
30 lines (28 loc) · 828 Bytes
/
App.tsx
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
import { StatusBar } from "expo-status-bar";
import React from "react";
import { StyleSheet, Text, View } from "react-native";
import NavContainer from "./navigation/MainNavigation";
import ReduxThunk from "redux-thunk";
import { Provider } from "react-redux";
import { combineReducers, createStore, applyMiddleware } from "redux";
import placesReducers from "./store/reducer/placesReducers";
import { init } from "./helpers/db";
init()
.then(() => {
console.log("db initialized");
})
.catch((err) => {
console.log("db failed");
console.log(err);
});
const rootReducer = combineReducers({
places: placesReducers,
});
const store = createStore(rootReducer, applyMiddleware(ReduxThunk));
export default function App() {
return (
<Provider store={store}>
<NavContainer />
</Provider>
);
}