mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-11 18:32:50 +00:00
added redux
This commit is contained in:
15
client/js/redux/store.js
Normal file
15
client/js/redux/store.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {applyMiddleware, createStore} from 'redux';
|
||||
import {syncHistoryWithStore} from 'react-router-redux';
|
||||
import {browserHistory} from 'react-router';
|
||||
import thunk from 'redux-thunk';
|
||||
|
||||
import reducers from './reducers';
|
||||
|
||||
const middleware = applyMiddleware(thunk);
|
||||
|
||||
//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;
|
||||
Reference in New Issue
Block a user