UNPKG

kibana-123

Version:

Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic

36 lines (31 loc) 805 B
import { applyMiddleware, createStore, compose, } from 'redux'; import thunk from 'redux-thunk'; import { browserHistory } from 'react-router'; import { routerMiddleware, routerReducer, } from 'react-router-redux'; import codeViewerReducer from './reducers/code_viewer_reducer'; /** * @param {Object} initialState An object defining the application's initial * state. */ export default function configureStore(initialState) { function rootReducer(state = {}, action) { return { routing: routerReducer(state.routing, action), codeViewer: codeViewerReducer(state.codeViewer, action), }; } const finalStore = compose( applyMiddleware( thunk, routerMiddleware(browserHistory) ) )(createStore)(rootReducer, initialState); return finalStore; }