forked from Real-Dev-Squad/mobile-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
31 lines (28 loc) · 819 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
31
import React from 'react';
import { AuthProvider } from './src/context/AuthContext';
import Toast from 'react-native-toast-message';
import Index from './src/Index';
import { applyMiddleware, compose, createStore } from 'redux';
import reducers from './src/reducers';
import { Provider } from 'react-redux';
import createSagaMiddleware from '@redux-saga/core';
import rootSaga from './src/sagas/rootSaga';
const sagaMiddleware = createSagaMiddleware();
const middleware = [sagaMiddleware];
export const store = compose(applyMiddleware(...middleware))(createStore)(
reducers,
);
sagaMiddleware.run(rootSaga);
const App = () => {
return (
<>
<Provider store={store}>
<AuthProvider>
<Index />
</AuthProvider>
</Provider>
<Toast />
</>
);
};
export default App;