-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
27 lines (25 loc) · 988 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
import React from 'react';
import Home from './app/components/home';
import Cart from './app/components/cart';
import Item from './app/components/item';
import {Provider} from 'react-redux';
import store, {persistedStore} from './app/redux/store';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
import {PersistGate} from 'redux-persist/es/integration/react';
const Stack = createStackNavigator();
export default function App() {
return (
<Provider store={store}>
<PersistGate persistor={persistedStore} loading={null}>
<NavigationContainer>
<Stack.Navigator initialRouteName="Home" headerMode="none">
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Cart" component={Cart} />
<Stack.Screen name="Item" component={Item} />
</Stack.Navigator>
</NavigationContainer>
</PersistGate>
</Provider>
);
}