aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/index.js')
-rw-r--r--src/client/react/index.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/client/react/index.js b/src/client/react/index.js
index 650e6de..2e35594 100644
--- a/src/client/react/index.js
+++ b/src/client/react/index.js
@@ -27,7 +27,10 @@ import { createStore, applyMiddleware, compose as reduxCompose } from 'redux';
import thunk from 'redux-thunk';
import moment from 'moment';
-import reducer from './reducers';
+import createHistory from 'history/createBrowserHistory';
+
+import makeGetHistory from './lib/getHistory';
+import reducer from './store/reducers';
import App from './App';
import './index.scss';
@@ -35,6 +38,8 @@ import './index.scss';
// number logic is used.
moment.locale('nl');
+const history = createHistory();
+
const compose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || reduxCompose;
const store = createStore(
@@ -42,12 +47,12 @@ const store = createStore(
// Redux devtools extension
// https://github.com/zalmoxisus/redux-devtools-extension
compose(
- applyMiddleware(thunk),
+ applyMiddleware(thunk.withExtraArgument(makeGetHistory(history))),
),
);
ReactDOM.render(
- <App store={store} />,
+ <App store={store} history={history} />,
document.querySelector('#root'),
);