rsnext/examples/with-kea/store.js

16 lines
430 B
JavaScript
Raw Normal View History

2017-11-13 12:21:11 +01:00
import { keaReducer } from 'kea'
import { createStore, compose, combineReducers } from 'redux'
const reducers = combineReducers({
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) => {
return createStore(reducers, initialState, compose(reduxDevTools))
2017-11-13 12:21:11 +01:00
}