Parameter 'dispatch' implicitly has an 'any' type

Dispatch is defined in @types/react-redux as

type Dispatch<S> = Redux.Dispatch<S>;

When I encountered this error message in the past, I simply had to install the @types/react-redux package.

You will likely find that many projects do not contain typings files. Luckily, the @types packages on NPM exist. They are maintained by the community at https://github.com/DefinitelyTyped/DefinitelyTyped


For better clarity, following should be the code snippet.

import { Dispatch } from 'redux';

//..... code
//..... code

const mapDispatchToProps = (dispatch: Dispatch) => bindActionCreators({
    // assignment here
});