Last active
January 24, 2016 22:31
-
-
Save mobinni/78deff742282f728187a to your computer and use it in GitHub Desktop.
A Modern Isomorphic Stack with Redux - Part 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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