2017-11-13 12:21:11 +01:00
|
|
|
import { keaReducer } from 'kea'
|
|
|
|
import { createStore, compose, combineReducers } from 'redux'
|
|
|
|
|
|
|
|
const reducers = combineReducers({
|
2019-05-07 02:57:34 +02:00
|
|
|
kea: keaReducer('kea'),
|
2017-11-13 12:21:11 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
const reduxDevTools =
|
|
|
|
typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__
|
|
|
|
? window.__REDUX_DEVTOOLS_EXTENSION__()
|
2020-05-18 21:24:37 +02:00
|
|
|
: (f) => f
|
2017-11-13 12:21:11 +01:00
|
|
|
|
2020-05-18 21:24:37 +02:00
|
|
|
export const initStore = (initialState) => {
|
2019-05-11 21:09:58 +02:00
|
|
|
return createStore(reducers, initialState, compose(reduxDevTools))
|
2017-11-13 12:21:11 +01:00
|
|
|
}
|