Colocate reducers, actions and selectors
This commit is contained in:
parent
1e7d4c3fe4
commit
889e3b88b7
53 changed files with 1031 additions and 914 deletions
|
@ -1,24 +0,0 @@
|
|||
import { createStore, applyMiddleware, compose } from 'redux';
|
||||
import thunk from 'redux-thunk';
|
||||
import createReducer from '../reducers';
|
||||
import { routeReducer, routeMiddleware } from '../util/router';
|
||||
import createSocketMiddleware from '../middleware/socket';
|
||||
import commands from '../commands';
|
||||
|
||||
export default function configureStore(socket) {
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
|
||||
|
||||
const reducer = createReducer(routeReducer);
|
||||
|
||||
const store = createStore(reducer, composeEnhancers(
|
||||
applyMiddleware(
|
||||
routeMiddleware,
|
||||
thunk,
|
||||
createSocketMiddleware(socket),
|
||||
commands
|
||||
)
|
||||
));
|
||||
|
||||
return store;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue