You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
481 B
TypeScript
20 lines
481 B
TypeScript
import { createStore, applyMiddleware, compose } from 'redux';
|
|
import thunk from 'redux-thunk';
|
|
|
|
import rootReducer from './reducers/root-reducer';
|
|
|
|
export default function configureStore(initialState = {}) {
|
|
return createStore(
|
|
rootReducer,
|
|
initialState,
|
|
compose(
|
|
applyMiddleware(thunk),
|
|
(window as any).__REDUX_DEVTOOLS_EXTENSION__
|
|
?
|
|
(window as any).__REDUX_DEVTOOLS_EXTENSION__({ trace: true })
|
|
:
|
|
(f: any) => f
|
|
)
|
|
);
|
|
}
|