configureStore = (initialState: Object) => {
	const middlewares = [thunk, routerMiddleware(history), promiseMiddleware()]
	const enhancers = middlewares.map(a => applyMiddleware(a))

	const getComposeFunc = () => {
		if (process.env.NODE_ENV === 'development') {
			const {composeWithDevTools} = require('redux-devtools-extension')
			return composeWithDevTools
		}
		return compose
	}

	const composeFunc = getComposeFunc()
	const composedEnhancers = composeFunc.apply(null, enhancers)

	return createStore(rootReducer, initialState, composedEnhancers)
}
Configure application store
@param  {Object} initialState - preloadedState
@return {Object} - configured store