receptor/src/store.js
2017-08-21 17:10:52 -05:00

20 lines
373 B
JavaScript

import {
applyMiddleware,
createStore,
compose
} from 'redux';
import thunk from 'redux-thunk';
import reducer from './reducers';
const _compose =
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
|| compose;
const store = createStore(
reducer,
_compose(applyMiddleware(thunk)),
);
export const dispatch = action => store.dispatch(action);
export default store;