reducers.js 550 Bytes
Newer Older
dengxiaofeng's avatar
dengxiaofeng committed
1 2 3 4
// import { connectRouter } from 'connected-react-router';
import { connectRouter } from 'connected-react-router/immutable';
// import { combineReducers } from 'redux';
import { combineReducers } from 'redux-immutable';
Julien Benchetrit's avatar
Julien Benchetrit committed
5

dengxiaofeng's avatar
dengxiaofeng committed
6
import { reducer as globalReducer } from './containers/App/store';
dengxiaofeng's avatar
dengxiaofeng committed
7
import history from './utils/history';
Julien Benchetrit's avatar
Julien Benchetrit committed
8 9 10 11 12 13 14 15 16 17

export default function createReducer(injectedReducers = {}) {
  const rootReducer = combineReducers({
    global: globalReducer,
    router: connectRouter(history),
    ...injectedReducers,
  });

  return rootReducer;
}