aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2017-12-14 16:38:11 +0100
committerNoah Loomans <noahloomans@gmail.com>2017-12-14 16:38:11 +0100
commit8e9d5e98793f7594a8a1a1b5956163eca6795164 (patch)
treef51d8a08bf67dc3ba4788d5ab77248a40dc245d2
parent43c72f445c7906ab707493b3e857acf83d5bcd1f (diff)
Add redux-thunk
-rw-r--r--package.json1
-rw-r--r--src/client/react/index.jsx3
-rw-r--r--yarn.lock4
3 files changed, 7 insertions, 1 deletions
diff --git a/package.json b/package.json
index d828a9e..fdc7374 100644
--- a/package.json
+++ b/package.json
@@ -50,6 +50,7 @@
"react-router-dom": "^4.2.2",
"redux": "^3.7.2",
"redux-logger": "^3.0.6",
+ "redux-thunk": "^2.2.0",
"request": "^2.74.0",
"sass-loader": "^6.0.6",
"smoothscroll-polyfill": "^0.3.4",
diff --git a/src/client/react/index.jsx b/src/client/react/index.jsx
index f0e4e23..5279bf4 100644
--- a/src/client/react/index.jsx
+++ b/src/client/react/index.jsx
@@ -4,6 +4,7 @@ import { Provider } from 'react-redux';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import { createStore, applyMiddleware, compose } from 'redux';
import logger from 'redux-logger';
+import thunk from 'redux-thunk';
import reducer from './reducers';
import LandingPage from './LandingPage';
@@ -11,7 +12,7 @@ import LandingPage from './LandingPage';
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(
reducer,
- composeEnhancers(applyMiddleware(logger)),
+ composeEnhancers(applyMiddleware(logger, thunk)),
);
ReactDOM.render(
diff --git a/yarn.lock b/yarn.lock
index f9f4907..071b4df 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5946,6 +5946,10 @@ redux-logger@^3.0.6:
dependencies:
deep-diff "^0.3.5"
+redux-thunk@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.2.0.tgz#e615a16e16b47a19a515766133d1e3e99b7852e5"
+
redux@^3.7.2:
version "3.7.2"
resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b"