mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-16 10:18:48 +00:00
28 lines
656 B
JavaScript
28 lines
656 B
JavaScript
import { createStore, combineReducers, applyMiddleware, compose } from 'redux';
|
|
import thunk from 'redux-thunk';
|
|
|
|
import userReducer from './reducers/userReducer';
|
|
import dataReducer from './reducers/dataReducer';
|
|
import uiReducer from './reducers/uiReducer';
|
|
|
|
const initialState = {};
|
|
|
|
const middleware = {thunk};
|
|
|
|
const reducers = combineReducers({
|
|
user: userReducer,
|
|
data: dataReducer,
|
|
UI: uiReducer
|
|
});
|
|
|
|
const store = createStore(
|
|
reducers,
|
|
initialState,
|
|
compose(
|
|
applyMiddleware(...middleware),
|
|
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
|
|
|
|
)
|
|
)
|
|
|
|
export default store; |