import { applyMiddleware, compose, createStore } from 'redux';
import rootReducer from './../reducers';
import thunk from 'redux-thunk';
const composeEnhancers = process.env.NODE_ENV === 'development' ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : null || compose;
const middlewares = [thunk];
const enhancers = [applyMiddleware(...middlewares)];
const store = createStore(rootReducer, composeEnhancers(...enhancers));
const configureStore = () => {
return store;
}
export default configureStore;
import configureStore from '../../redux/configureStore';
configureStore();
import * as taskConstants from './../constants/task';
var initialState = {
listTask: []
}
var task = (state = initialState, action) => {
switch(action.type) {
case taskConstants.FETCH_TASK : {
return {
...state,
listTask: []
}
}
break;
default:
return state;
break;
}
}
export default task;