mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-11 02:12:53 +00:00
16 lines
518 B
JavaScript
16 lines
518 B
JavaScript
import {applyMiddleware, createStore} from 'redux';
|
|
import {syncHistoryWithStore} from 'react-router-redux';
|
|
import {browserHistory} from 'react-router';
|
|
import thunk from 'redux-thunk';
|
|
import logger from 'redux-logger';
|
|
|
|
import reducers from './reducers';
|
|
|
|
const middleware = applyMiddleware(thunk, logger());
|
|
|
|
//create the new store with default state as an empty object
|
|
const store = createStore(reducers, {}, middleware);
|
|
|
|
export const history = syncHistoryWithStore(browserHistory, store);
|
|
|
|
export default store; |