Skip to content

Instantly share code, notes, and snippets.

@mobinni
Last active January 24, 2016 22:31
Show Gist options
  • Save mobinni/78deff742282f728187a to your computer and use it in GitHub Desktop.
Save mobinni/78deff742282f728187a to your computer and use it in GitHub Desktop.
A Modern Isomorphic Stack with Redux - Part 2
import ModuleCollector from './modules/moduleCollector';
import storeBuilder from './store/storeBuilder';
import feed from './modules/feed';
export function initialise(customMiddlewares = []) {
const moduleCollector = new ModuleCollector();
moduleCollector.add(feed);
const coreReducers = moduleCollector.getReducers();
const {store, middlewares} = storeBuilder(
coreReducers,
customMiddlewares
);
const modules = moduleCollector.get();
return { store, modules, middlewares };
}
export default {
initialise
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment