I am following a TypeScript-React-Starter tutorial, and wrapping a component into a container, Hello.tsx. Line 4 is
import {connect, Dispatch} from 'react-redux';
and throws the following error on Dispatch:
Module '"../../node_modules/@types/react-redux"' has no exported member 'Dispatch'.
How do I import Dispatch?
Do I need to update something? npm install doesn't help, not even after updating to the latest npm version.
This really a breaking change. Dispatch is part of "redux" instead of "react-redux".
import { connect } from "react-redux";
import { Dispatch } from "redux";
For more information visit TypeScript-React-Starter Issue
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With