-
-
Notifications
You must be signed in to change notification settings - Fork 55
/
App.js
40 lines (33 loc) · 1.02 KB
/
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
import React from 'react';
import { createStore, combineReducers, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import ReduxThunk from 'redux-thunk';
import FlashMessage from "react-native-flash-message";
import { MenuProvider } from 'react-native-popup-menu';
// import { composeWithDevTools } from 'redux-devtools-extension';
import authReducer from './store/reducers/auth';
import postsReducer from './store/reducers/posts';
import usersReducer from './store/reducers/users';
import chatReducer from './store/reducers/chat';
import AppNavigator from './navigation/AppNavigator';
const rootReducer = combineReducers({
auth: authReducer,
posts: postsReducer,
users: usersReducer,
chat: chatReducer
});
const store = createStore(
rootReducer,
applyMiddleware(ReduxThunk)
// composeWithDevTools()
);
export default function App() {
return (
<Provider store={store}>
<MenuProvider>
<AppNavigator />
</MenuProvider>
<FlashMessage position="top" />
</Provider>
);
}