mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-29 10:28:53 +03:00
16 lines
493 B
JavaScript
16 lines
493 B
JavaScript
import { createStore, applyMiddleware, compose } from 'redux';
|
|
import thunk from 'redux-thunk';
|
|
|
|
const middlewares = [
|
|
thunk,
|
|
];
|
|
|
|
export default function configureStore(reducer, initialState) {
|
|
/* eslint-disable no-underscore-dangle */
|
|
const store = createStore(reducer, initialState, compose(
|
|
applyMiddleware(...middlewares),
|
|
window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f,
|
|
));
|
|
/* eslint-enable */
|
|
return store;
|
|
}
|