-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
40 lines (33 loc) · 906 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
35
36
37
38
39
40
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React from 'react';
// Redux store
import { createStore, combineReducers, applyMiddleware } from "redux";
import { Provider } from "react-redux";
import productsReducer from "./store/reducers/products";
import cartReducer from "./store/reducers/cart";
import ordersReducer from "./store/reducers/orders";
import authReducer from "./store/reducers/auth"
import ReduxThunk from "redux-thunk";
// Navigation
import AppNavigator from "./navigation/AppNavigator";
const rootReducer = combineReducers({
orders: ordersReducer,
products: productsReducer,
cart: cartReducer,
auth: authReducer
})
const store = createStore(rootReducer, applyMiddleware(ReduxThunk))
const App = () => {
return (
<Provider store={store}>
<AppNavigator />
</Provider>
);
};
export default App;