Skip to content

Instantly share code, notes, and snippets.

@Archakov06
Created June 26, 2019 10:15
Show Gist options
  • Save Archakov06/1891c9122f219200046200f026e12606 to your computer and use it in GitHub Desktop.
Save Archakov06/1891c9122f219200046200f026e12606 to your computer and use it in GitHub Desktop.
import { combineReducers } from 'redux';
const reducers = ['channels', 'bots', 'posts', 'user'];
export default combineReducers(
reducers.reduce((initial, name) => {
initial[name] = require(`./${name}`).default;
return initial;
}, {}),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment