Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

has no exported member 'Dispatch'. #160

Open
wuchaoya opened this issue Jul 3, 2018 · 9 comments · May be fixed by #195
Open

has no exported member 'Dispatch'. #160

wuchaoya opened this issue Jul 3, 2018 · 9 comments · May be fixed by #195

Comments

@wuchaoya
Copy link

wuchaoya commented Jul 3, 2018

I'll do it according to the instructions . There was a mistake

import { connect, Dispatch } from 'react-redux';

Failed to compile.

Module '"node_modules/@types/react-redux/index"' has no exported member 'Dispatch'.

@andreypudov
Copy link

Confirm the issue.

@wuchaoya
Copy link
Author

wuchaoya commented Jul 4, 2018

My English is not very good,I'm not sure if you understand what I'm talking about。

@andreypudov
Copy link

@wuchaoya I just want to say that I am able to reproduce this issue o my computer and I would like to get developers attention to this case.

@qinkangwu
Copy link

修改package里面的版本可以解决
"@types/react-redux": "^4.0.30"

@fabianmeyer
Copy link

fabianmeyer commented Jul 5, 2018

Dispatch is no longer part of the react-redux library. To fix the issue, replace

import { connect, Dispatch } from 'react-redux';

with

import { connect } from 'react-redux';
import { Dispatch } from 'redux';

@wuchaoya
Copy link
Author

wuchaoya commented Jul 6, 2018

Thank you very much.

@vincentwongso
Copy link

Might need to update the Readme.md file as well, in the Readme.md it's still using:

import { connect, Dispatch } from 'react-redux';

ACollectionOfAtoms added a commit to ACollectionOfAtoms/TypeScript-React-Starter that referenced this issue Aug 23, 2018
`Dispatch` is no longer exported from `react-redux` but rather, `redux`:

microsoft#160
@afzalsayed96 afzalsayed96 linked a pull request Oct 3, 2018 that will close this issue
@Charlesdoiron
Copy link

Hello,
the readme is still out of date.
Thanks !
Capture d’écran 2019-05-03 à 15 04 35

@Dronozavr
Copy link

Dronozavr commented Jun 3, 2019

Hello, is somewhere some script to execute and to fix it because I have to spend two hours to fix this case throughout my whole app? Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants