Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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