I am trying to learn redux and I am trying to implement the redux-thunk
middleware. I've been following a few different tutorials and they suggest something similar to this:
import thunk from "redux-thunk";
import promise from "redux-promise-middleware";
...
const middleware = applyMiddleware(promise(), thunk);
const store = createStore(reducers, middleware);
This gives me the following error:
/Users/me/Documents/workspace/redux/node_modules/redux-thunk/index.d.ts (4,47): Generic type 'Dispatch' requires 2 type argument(s).
Can someone please explain what is going on and how to fix this?
Many thanks