Skip to content

Instantly share code, notes, and snippets.

@terrynguyen255
Created June 11, 2019 20:53
Show Gist options
  • Save terrynguyen255/e2118d1b5fd98d649248bf6e9600fe47 to your computer and use it in GitHub Desktop.
Save terrynguyen255/e2118d1b5fd98d649248bf6e9600fe47 to your computer and use it in GitHub Desktop.
app/reducers.js
import { combineReducers } from 'redux';
import { connectRouter } from 'connected-react-router';
import history from 'utils/history';
import globalReducer from 'containers/App/reducer';
export default function createReducer(injectedReducers = {}) {
const rootReducer = combineReducers({
global: globalReducer,
router: connectRouter(history),
...injectedReducers,
});
return rootReducer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment