-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigureStore.js
53 lines (39 loc) · 1.34 KB
/
configureStore.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
41
42
43
44
45
46
47
48
49
50
51
52
53
//redux-thunk imp
// import {createStore, applyMiddleware} from 'redux'
// import app from './reducers'
// import thunk from 'redux-thunk'
// export default function configureStore() {
// let store = createStore(app, applyMiddleware(thunk))
// return store
// }
//redux-saga imp
/*
import {createStore, applyMiddleware} from 'redux'
import app from './reducers'
import createSagaMiddleware from 'redux-saga'
import dataSaga from './saga'
const sagaMiddleware = createSagaMiddleware()
export default function configureStore() {
const store = createStore(app, applyMiddleware(sagaMiddleware))
sagaMiddleware.run(dataSaga)
return store
}
*/
// redux-rxjs imp
// import {createStore, applyMiddleware} from 'redux'
// import app from './reducers'
// import {createEpicMiddleware} from 'redux-observable'
// import fetchUserEpic from './epic'
// const epicMiddleware = createEpicMiddleware(fetchUserEpic)
// export default function configureStore() {
// const store = createStore(app, applyMiddleware(epicMiddleware))
// return store
// }
// redux promise middleware
import {createStore, applyMiddleware} from 'redux'
import app from './reducers'
import promiseMiddleware from 'redux-promise-middleware';
export default function configureStore() {
let store = createStore(app, applyMiddleware(promiseMiddleware()))
return store
}