-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
33 lines (29 loc) · 802 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
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React from 'react';
import { Provider } from 'react-redux'
import { createStore, applyMiddleware, combineReducers, compose} from 'redux'
import createSagaMiddleware from 'redux-saga'
import getQuizData from './reducers'
import { MainApp } from './components/MainApp'
import rootSaga from './sagas'
const middleware = []
const enhancers = []
const sagaMiddleware = createSagaMiddleware()
middleware.push(sagaMiddleware)
enhancers.push(applyMiddleware(...middleware))
const store = createStore(
combineReducers({
getQuizData }),
compose(...enhancers))
sagaMiddleware.run(rootSaga)
const App = () =>
<Provider store={store}>
<MainApp />
</Provider>
export default App