UNPKG

phenomic

Version:

Modern website generator based on the React and Webpack ecosystem.

22 lines (18 loc) 490 B
// @flow import { createStore, applyMiddleware, compose } from "redux" import promiseMiddleware from "../middlewares/promise" export default function( reducer: Object = {}, initialState: any = {}, extraMiddlewares: any = {}, extraStoreEnhancers: any = {} ): Function { const finalCreateStore = compose( applyMiddleware( promiseMiddleware, ...extraMiddlewares ), ...extraStoreEnhancers )(createStore) return finalCreateStore(reducer, initialState) }